Forum Moderators: not2easy

Message Too Old, No Replies

Simple IE problem i think

         

Flash_Ghost

7:17 am on Mar 10, 2005 (gmt 0)

10+ Year Member



I am starting out learing css and am having a really hard time with creating proper div sizes!

#first{
padding:0px;
margin:0px;
border:0px;
width:800px;
height:5px;
background-color:#000000;
}

is my code but for some reason the size of the box is around 10px all the time in IE but not in firefox!

Sorry for the simple Q!

zollerwagner

7:26 am on Mar 10, 2005 (gmt 0)

10+ Year Member



Is there anything in the div?

I wonder if it would help if you defined a font-size for the div?

If all you want is a color bar, you might want to define an <hr /> instead of a div.

Have you tried validating your css and html in the w3.org's validators? Very useful. The Web Developer's tool bar extension for Firefox has links to them.

Just a tip: instead of writing "0px", you can just put "0" because the kind of measure is irrelevant when there's zero of them.

Flash_Ghost

5:13 pm on Mar 10, 2005 (gmt 0)

10+ Year Member



font-size: 5px; worked for me, thanks!