Log in

View Full Version : positioning elements



rob11
07-04-2007, 08:59 PM
I updated a old html with CSS.
The page looks good in Fire Fox. In IE a block of text is about 20px high and the bottom 3" of the page is cut off.

Hear is what I used:

<div style="
position:relative;
top:120px;
width:600px;
height:40px;
margin-left: auto;
margin-right: auto;
z-index:7 ">

text

</div>

Anybody know why??:confused:

Thanks to all who help.:)

Jas
07-05-2007, 03:33 AM
Yeah, that is a problem. . . It's been on DD several times. . . See it you can learn any from this http://www.dynamicdrive.com/forums/showthread.php?p=98551 or one of the other threads on the subject. The best thing to do is try something else, like a &#37; or em.

pegasus58
07-05-2007, 05:27 AM
Try removing the height:
<div style="position:relative; top:120px; width:600px; margin:0px auto; ">

text

</div>

If you want the height either use: a higher setting or overflow:scroll.

By the way z-index only works on absolute positioned elements it has no effect on relative position.

Mark

rob11
07-19-2007, 01:45 AM
removing the height did not help.:confused: