Wed, 2009-04-01 04:40
I am using FF3, IE7, and IE6. Background of hr element shows nice but IE7 and IE6 could not render hr element it shows unnecessary gray background. How could I make similar hr element's background.
HTML CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>hr</title> </head> <body> <hr/> </body> </html>
CSS CODE
body{ background:#414142; } hr{ background:#ff0000 url(hrBg.jpg) 0 0 repeat-x; height:3px; display:block; clear:both; border:none; }
| Attachment | Size |
|---|---|
| hrBg.jpg | 334 bytes |
| hr-screenshot.jpg | 58.95 KB |
Wed, 2009-04-01 04:51
#1
I don't think you'll be able
I don't think you'll be able to style s background in IE, but really for what you're doing, you're better off using a dotted/dashed CSS border instead.
Wed, 2009-04-01 04:58
#2
but again different border behavior in IE and FF
I was intending to take border on hr but it still give problem in IE and FF. It shows little bit different in multibrowser