SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: hr in Mozilla

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Places
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question hr in Mozilla

    Okay, so I just redesigned my site http://www.equiangular.net and it's all pretty and cool and stuff.

    I put the style for horizontal lines into the CSS like this:

    hr
    { margin-top: 10px;
    margin-bottom: 10px;
    color: #AA282E;
    width: 100%;
    height: 1px; }

    It works great in IE, but not in Mozilla or Opera (though I don't really care about Opera).

    Does Mozilla not support color for hr's? If it does, is there anything wrong with my coding for the CSS?

    It's not a huge deal or anything, but if Mozilla does support color for hr's then I'd like to take advantage of it.

    equang

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    United States
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to add the background-color attribute to set the color of the line in Mozilla and Opera (but leave the color attribute as well; I don't think background-color works with IE).

    Code:
    hr
    { margin-top: 10px;
    margin-bottom: 10px;
    color: #AA282E;
    background-color: #AA282E;
    width: 100%;
    height: 1px; }

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Places
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I appreciate your help but it didn't work for either. Hmph.

    Thanks again!

    equang

  4. #4
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    United States
    Posts
    84
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry about that; I didn't actually test my solution. You need to add "border: 0px;" so that the border doesn't override the (background-)color.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    Places
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Woo! Thanks bunches!

    As you can probably guess it worked ^_^;;

    Thanks so much for your help!

    equang


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
  •