Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Modified Horizontal Bar
06-28-2007, 04:43 PM #1
- Join Date
- May 2005
- Thanked 0 Times in 0 Posts
Modified Horizontal Bar
I am building a new website where I want to use meaningful markup --using each element for what it is, not for layout purposes. I am now trying to make a horizontal bar <hr> display a customized image instead of the typical grayish bar. I tried setting the height to 10px and adding a background image, but this obviously didn't work. So do you have any tips on how I can achieve this? Or will I be stuck using an <img> tag for the horizontal bar?
06-28-2007, 06:09 PM #2
- Join Date
- Jan 2006
- Halle (Saale), Germany
- Thanked 1,022 Times in 995 Posts
Now, I once had the same problem and the first thing I did was open a new tab and type “styling hr” in the search bar. You know what came up first? http://www.sovavsiti.cz/css/hr.html
That’s the best source among those I found. Unfortunately it seems like what you wanna do isn’t quite possible with completely semantic HTML. You have to wrap a div around the horizontal rule. But I think that’s something we can live with.