Forum Moderators: not2easy

Message Too Old, No Replies

Need a Quick Sanity Check

top attribute does not work with any positioning outside of document flow

         

eichurchen

2:45 am on Sep 3, 2003 (gmt 0)

10+ Year Member



I am decent with CSS, but this has me. It renders similar in both IE 6.0.2800 and Mozilla 1.4. I ran it through the htmlhelp.com validator and got nothing except crap about the background color.

Basically, my problem deals with absolute position elements (div and p tags are all I have tried) which will not align along a vertical axis (but will left and right).

Real quick the CSS is like this:

#leftnav{

position: fixed;
left: 0em;
top: 25em:
bottom: 0em;
right: 0em;
height: 15em;
width: 10em;
border: 1px dashed black;
}

Now my beef is with the top attribute. It is set at 25em. Now look at the page, and its not 25em from the top. I change it and the leftnav doesn't move. I even set a height and width, thinking that might be necessary.

Here is my simple html:

/body/

/div id="main"/
hello
/p id="leftnav"/
hello world
//p/
//div/
//body/

I have tried changing the p tags to divs, and vice versa. As well as nesting them differently. All I want to do is overlap a sidebar image in the leftnav box.

<snip>no urls please</snip>

[edited by: Nick_W at 6:00 am (utc) on Sep. 3, 2003]

DrDoc

3:27 am on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World!

Two things:

1) IE does not support position:fixed
2) Do not mix left-right and top-bottom values. Remove bottom:0em and right:0em.

eichurchen

4:23 am on Sep 3, 2003 (gmt 0)

10+ Year Member



Thanks for the information. I have deleted all the bottom and right values (and updated the tripod examples). And the block level element in question is now absolute, not fixed.

It works fine. Thanks a lot. I can't believe I missed these errors. Oh well, you shouldn't do anything too late at night.

Thanks again.