1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Browsers and <hr /> color

Discussion in 'CSS' started by saurabhk, Jul 28, 2006.

  1. #1
    I tried to change the color of horizontal rules on the page by:
    <hr color="#ff0000" />

    And also by:

    <style>
    hr {color:#ff0000 }
    </style>

    It works fine in IE and But in other browsers like netscape and Opera the default color is displayed, how can i deploy the desired effect in these browsers?
     
    saurabhk, Jul 28, 2006 IP
  2. wmburg

    wmburg Active Member

    Messages:
    300
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #2
    I don't think you need color. Try background:#ff0000;
     
    wmburg, Jul 28, 2006 IP
  3. Superorb

    Superorb Peon

    Messages:
    149
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I agree, I thought "color" was for text color only.
     
    Superorb, Jul 28, 2006 IP
  4. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You'll want border-style: solid and then set border-color to whatever color you want. Also, you may want to specify the border-width.
     
    Gordaen, Jul 28, 2006 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    kk5st, Jul 28, 2006 IP
  6. saurabhk

    saurabhk Peon

    Messages:
    149
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks to all, border-color and border-width work.
     
    saurabhk, Jul 29, 2006 IP
  7. tayiper

    tayiper Active Member

    Messages:
    421
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    78
    #7
    tayiper, Jul 29, 2006 IP