Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2005
    Location
    Alabama
    Posts
    49
    Thanks
    0
    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?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,918
    Thanks
    6
    Thanked 1,040 Times in 1,013 Posts
    Quote Originally Posted by jshl_wiz View Post
    I am building a new website where I want to use meaningful markup --using each element for what it is, not for layout purposes.
    Very nice. You get a rep. point from me just for that already.

    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •