Click to See Complete Forum and Search --> : line problems
kproc
08-21-2007, 10:15 PM
I attached the below to a div and the line displays correctly in Firefox but ie make the height higher then it should any ideas why
.rule {
margin:0;
padding:0;
height:3px;
margin-bottom:8px;
background-color: #EFF7C0;
}
Kravvitz
08-21-2007, 10:32 PM
IE4-6/Win won't let an element have a height that is less than its line-height. To fix this you can decrease the font-size and line-height OR use overflow:hidden.
mactheweb
08-22-2007, 12:20 AM
One solution is to zero out your margins and padding at a higher level using something like:
body * {marign: 0; padding:0; }
Of course if you do that you will have to reset all attributes for all elements. That's not as bad as it sounds. Do it well once then you can reuse the new stylesheet as a basis for all later projects. Look at Yahoo User Interface (http://developer.yahoo.com/yui/grids/), Mollio (http://www.mollio.org/) and Blueprint (http://code.google.com/p/blueprintcss/) for some well thought out and completer examples.
kproc
08-22-2007, 07:30 PM
thank you for the help. I got it working