Click to See Complete Forum and Search --> : CSS2: Horizontal Rule Has 1px Border in IE?
kwilliams
04-27-2006, 09:07 AM
I'm having a problem yet again with how CSS2 is rendered in IE. This time, I'm trying to create a customized horizontal rule. It works great in Firefox, but not in IE. It shows up with some sort of border/indentation in IE, even thought the border is set to 0px. I've created a test page at http://www.douglas-county.com/testhr.asp that shows exactly what I'm seeing in IE.
If anyone knows whether or not there is a solution to this, I'd really appreciate hearing it. Thanks for any help.
jogol
04-27-2006, 09:24 AM
maybe border: none; works while border: 0; doesn´t (just guessing).
your actual css code would be nice to look at...
kwilliams
04-27-2006, 09:27 AM
Ok, I've actually added the CSS to the page with an actual horizontal rule. I had just intended for people to see what I was seeing, but now I understand that you can't help without all of the information. Thanks for the heads-up.
jogol
04-27-2006, 09:46 AM
ok the trick is to set color and background to the same color to make it look the same in IE and FF
hr {
border: 0;
width: 99.6%;
color: #660000;
background-color: #660000;
height: 6px;
}
kwilliams
04-27-2006, 09:51 AM
OUTSTANDING! As you can see on the page, it now works properly in both IE and FF. Thanks jogol for the great tip. I just wish that we didn't have to mess with CSS in this way just to get it to work in a browser that's behind the times. Anyway, thanks so much for your help. You saved me a real headache:)
jogol
04-27-2006, 09:56 AM
you´re welcome