Results 1 to 4 of 4

Thread: <hr> css

  1. #1
    Join Date
    May 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question <hr> css

    Hi,

    I'd like to use an image instead of the standard horizontal bar in the <hr> tag. Would I use a code like this:

    .hr
    {background:url('/graphics/website/spacerbtn.gif') no-repeat;}

    I've tried it, but it hasn't worked. I know there is a way to do it, but I haven't done css in such a long time. I do believe I am having css amnesia.

    anyhelp is appreciated!

    Thanks!
    Last edited by jm7166; 05-24-2008 at 03:07 PM.

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    you are assigning a class with that code

    get rid of the dot at the beginning and you should be able to see yourbackground image

    Code:
    hr {background:url('/graphics/website/spacerbtn.gif') no-repeat;}
    you may need to explicitly set the height property depending on the image you wish to use though, so just test it out


    // 1500th Post
    Last edited by boogyman; 05-27-2008 at 02:01 PM.

  3. #3
    Join Date
    May 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thanks!



    Thanks for the help. I'll give it a shot!!

  4. #4
    Join Date
    Feb 2008
    Posts
    63
    Thanks
    2
    Thanked 8 Times in 8 Posts

    Default

    I guess I've never called in my image for the HR using background image. It's easier to just use
    Code:
    <img src="images/picname.jpg> alt="name" width="80%" height="3" />
    You can also assign a class to it for centering if you'd like.

    Sandy K

Bookmarks

Posting Permissions

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