View Full Version : Problems with IE and DIVs...


smartie5602
03-06-2005, 10:03 PM
I want to make divs that are 1px high.

For example, with the following code:

<html>

<head>
<style>
.line {background-color:#0000ff; left:20px; position:absolute; width:200px; top:50px; height:1px}
</style>
</head>

<body>
<div class="line"> </div>
</body>

</html>

(note the code 'height:1px')

This happens:

http://www.brunel.ac.uk/~ee04ems/images/ff-ie.gif
(Left:Firefox, Right:IE)

Bloody IE :(. Anyone know how I might fix this (simply)? or am I gonna have to make little line images (which I was trying to avoid)?

Cheers!

xx

Seven
03-06-2005, 10:05 PM
Hmm, that's weird. What if instead of doing that. You make a div and say: border-bottom: 1px; ? Just an idea, I've never seen that problem before.

kittycat
03-06-2005, 11:17 PM
font-size: 0;
Add that to the CSS for the div