Forum Moderators: not2easy
hr {padding:20px 0 0 0;
border:1px dashed #f00;
background-color:transparent;
border-bottom:1px dashed #000;} I want the top transparent but for testing I am using a red colour. The bottom should be a black dashed line. The gaps should be transparent so a background image can show through.
What I've found is that if you increase the border size above 1px, the hr never gets any bigger. Mozilla also seems to have a bug where the hr disappears except for the sides!
Can hr not be made any larger?
How about smaller so only one thin line appears - how is that possible?
I've tried various code combinations but nothing seems to have any effect.
Also I can't get IE6 to use a transparent colour for the top border - it comes out white.
Hmmm.... now I need to add
border:none; to suit Mozilla. But when I increase the pixel height to 2px, it gives an extra pixel of height in that browser! :-( Next I need to change
color to background-color as I just read in Bugzilla that Mozilla takes it's HR colour from the background. Otherwise the colour is always black. Now I'm getting a grooved border effect in IE6 when it should be solid. IE is also putting the border outside the background, yet Mozilla and Opera draw it inside. But at least I can make the border any size I want now!
Here's my code:
hr {
height:100px;
width:100%;
background-color: #ff0;
border:10px dashed red;
} Gotta love browser differences! :-)