help with DIV

liunx

Guest
Anyone know how I can make a DIV container's position - relative to another landmark on the HTML page?<br />
<br />
I have a floating menu in DIV tags. It currently covers some graphics at the top of the page on load. I want it to be beneath the graphics for starters - then follow me down the page at about the same position it was covering the graphics to begin with....make sense?<br />
<br />
<br />
Thx,<!--content-->read about z-index css property may be here<br />
<br />
<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/visuren.html#propdef-z-index">http://www.w3.org/TR/REC-CSS2/visuren.h ... ef-z-index</a><!-- m --><br />
<br />
Cheers<br />
<br />
Khalid<!--content-->If two divs are overlapping, z-index property will determine which div is placed on top:<br />
<br />
--------------------<br />
| |<br />
| z-index: 1 |<br />
| |<br />
| --------------------<br />
-----| |<br />
| z-index: 2 |<br />
| |<br />
--------------------<br />
<br />
<br />
<br />
--------------------<br />
| |<br />
| z-index: 2 |<br />
| |<br />
| |-----<br />
-------------------- |<br />
| z-index: 1 |<br />
| |<br />
--------------------<br />
<br />
<br />
Do you mean that the two divs should not overlap?<br />
<br />
With the following, the image and text won't overlap:<br />
<div><!-- No styles here --><br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"image.gif" alt="Alt Text"><br />
</div><br />
<div><!-- Again, no styles reqd --><br />
Blah Blah Blah<br />
</div><br />
<br />
For a tutorial on absolute and relative positioning,<br />
<!-- m --><a class="postlink" href="http://www.w3schools.com/css/css_classification.asp">http://www.w3schools.com/css/css_classification.asp</a><!-- m --><!--content-->
 
Back
Top