PDA

View Full Version : Elements not lining up


squirellplaying
05-15-2005, 02:20 AM
I'm using a two column lay out. With firefox it's perfect, no suprise there, but with IE the two elements don't line up. Here's the page:

http://troop1910.ithium.net/index.php

As you can see in IE the navigation is about 2-3px above the main context. It's not a huge issue, but it drives me insane!
Here is the css for the two elements:

#conText{
position:relative;
float:left;
margin-top:10px;
text-align:center;
width:10em;
padding:0px;
padding-top:15px;
padding-bottom:15px;
margin-left:20px;
-moz-border-radius:10px;

}

#mainContents{
margin-left:12em;
margin-top:10px;
height: 500px;
display:block;
font-family:arial, sans-serif;
padding: 10px;
}

Both the top margins are at 10px so I don't understand why one is lower then the other.

Also has anyone had an issue with IE not commenting out css code? With firefox I could do "//" and have a line commented out, but not with IE. I don't really care but I found that interesting.

m5ka
05-15-2005, 02:06 PM
Hi!

I've found that the non-lining up elements has something to do with the

<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

statement on top of your code.

Also, for commenting out css code, you'd normally use /* comment */.

Cheers :D

squirellplaying
05-15-2005, 04:26 PM
Ahh I should have known that about the css.

I don't follow what's wrong with the DTD.