Doctor_Varney
11-07-2008, 11:46 PM
Here is a screenshot of the basic layout...
http://i183.photobucket.com/albums/x103/Doctor_Varney/layout-scrnshot-002.jpg
You will see the content area lain out, ready to recieve the images and paragraph text.
Here is the intended result, illustrated with a graphical dummy layout...
http://i183.photobucket.com/albums/x103/Doctor_Varney/layout-scrnshot-001.jpg
And here is the code for trying to position the pictures and paragraph. It's not working out, except through trial and error and is not making sense to me.
The mark-up
<div id="content_wrap">
<div id="EVP">
<img
class="EVP001"
src="../assets/events/evp001.jpg"
alt="EVP2" />
<img
class="EVP002"
src="../assets/events/evp002.jpg"
alt="EVP2" />
<img
class="EVP003"
src="../assets/events/evp003.jpg"
alt="EVP3">
</div>
</div>
The CSS
/*******************
IMAGE PLACEMENT
********************/
#EVP img {position:absolute;}
.EVP001{left:0%;margin:2% 0 0 0;}
.EVP002{left:45%;margin:2% 0 0 -113px;}
.EVP003{left:85%;margin:2% 0 0 -80px;}
.EVP004{margin:0 0 0 0;}
.EVP005{margin:0 0 0 0;}
.EVP006{margin:0 0 0 0;}
.EVP007{margin:0 0 0 0;}
.EVP008{margin:0 0 0 0;}
.EVP009{margin:0 0 0 0;}
Finally - here is the exact result of the code cited above, using dummy images for now...
http://i183.photobucket.com/albums/x103/Doctor_Varney/layout-scrnshot-003.jpg
It's okay, but is only the result of jiggling the numbers to make it fit. I don't know what I'm doing, or why and as a result, not learning anything from it.
The main thing is, I do not understand why I cannot get the elements (or the DIV, #EVP) to nest inside the #content_wrap DIV, when I use position:absolute.
When I use position:relative, instead of :absolute, the elements WILL nest, but from thereon, nothing I do makes any sense; it's just random, hit and miss changing of numbers until something fits. I'd like very much to understand what is going on and why.
Additionally, float:left & :right don't work properly in this method, either. I thought I could float the first one left, position the middle one 50% (then pull it back with a negative margin), then float the last one right. But no, the right-most image just flies off the page. Seemed like a good idea at the time. It made sense to me, but sadly, not good enough.
So what would be the correct (or most reliable) method of evenly spacing these images and paragraphs, within the #EVP DIV? I'm sure I could use a standard-sized margin, if all the images were one size, but their widths & heights vary and this is what's making it complicated.
Can anyone help?
Many thanks,
Doctor V
http://i183.photobucket.com/albums/x103/Doctor_Varney/layout-scrnshot-002.jpg
You will see the content area lain out, ready to recieve the images and paragraph text.
Here is the intended result, illustrated with a graphical dummy layout...
http://i183.photobucket.com/albums/x103/Doctor_Varney/layout-scrnshot-001.jpg
And here is the code for trying to position the pictures and paragraph. It's not working out, except through trial and error and is not making sense to me.
The mark-up
<div id="content_wrap">
<div id="EVP">
<img
class="EVP001"
src="../assets/events/evp001.jpg"
alt="EVP2" />
<img
class="EVP002"
src="../assets/events/evp002.jpg"
alt="EVP2" />
<img
class="EVP003"
src="../assets/events/evp003.jpg"
alt="EVP3">
</div>
</div>
The CSS
/*******************
IMAGE PLACEMENT
********************/
#EVP img {position:absolute;}
.EVP001{left:0%;margin:2% 0 0 0;}
.EVP002{left:45%;margin:2% 0 0 -113px;}
.EVP003{left:85%;margin:2% 0 0 -80px;}
.EVP004{margin:0 0 0 0;}
.EVP005{margin:0 0 0 0;}
.EVP006{margin:0 0 0 0;}
.EVP007{margin:0 0 0 0;}
.EVP008{margin:0 0 0 0;}
.EVP009{margin:0 0 0 0;}
Finally - here is the exact result of the code cited above, using dummy images for now...
http://i183.photobucket.com/albums/x103/Doctor_Varney/layout-scrnshot-003.jpg
It's okay, but is only the result of jiggling the numbers to make it fit. I don't know what I'm doing, or why and as a result, not learning anything from it.
The main thing is, I do not understand why I cannot get the elements (or the DIV, #EVP) to nest inside the #content_wrap DIV, when I use position:absolute.
When I use position:relative, instead of :absolute, the elements WILL nest, but from thereon, nothing I do makes any sense; it's just random, hit and miss changing of numbers until something fits. I'd like very much to understand what is going on and why.
Additionally, float:left & :right don't work properly in this method, either. I thought I could float the first one left, position the middle one 50% (then pull it back with a negative margin), then float the last one right. But no, the right-most image just flies off the page. Seemed like a good idea at the time. It made sense to me, but sadly, not good enough.
So what would be the correct (or most reliable) method of evenly spacing these images and paragraphs, within the #EVP DIV? I'm sure I could use a standard-sized margin, if all the images were one size, but their widths & heights vary and this is what's making it complicated.
Can anyone help?
Many thanks,
Doctor V