SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    <? james('rules'); ?>
    Join Date
    Jun 2004
    Location
    Wales, UK
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    <hr> colour or alternative?

    Hi, i have a news.php script which each time is loaded, loads news from a database. I want to seperate each news post by a black line that goes 40% away across the text area. I use <hr wifth="40%"> but really i want a bold black line. I tried using noshade in the hr tag but it still isnt dark enough. What can i do to get this desired black line? Im thinking CSS hr{color:black} or something?
    Please help .

    Regards
    If knowledge is power - Why isn't our army librarians?!
    Statistics show that 63% of all statistics are fake.
    When i was little i broke my neck, and i havent looked back since .
    I completed the internet in 1 week. The end boss was pretty easy though .

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by 1337-Dev
    ...Im thinking CSS hr{color:black} or something?...
    Don't use HR tags much but from what I've read that should work.

  3. #3
    <? james('rules'); ?>
    Join Date
    Jun 2004
    Location
    Wales, UK
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wasnt sure, but i changed the text area background colour to black, and now shade is fine with the colour scheme. Thanks for the reply though .
    If knowledge is power - Why isn't our army librarians?!
    Statistics show that 63% of all statistics are fake.
    When i was little i broke my neck, and i havent looked back since .
    I completed the internet in 1 week. The end boss was pretty easy though .

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I would back it up with background-color as well:
    Code:
    hr {
      color: black;
      background-color: black;
    }
    IE (and Opera I believe) use color to determine the hr's color, but Mozilla uses background-color.

  5. #5
    SEOChat has too many ads Protoss's Avatar
    Join Date
    Aug 2004
    Location
    Long Island, NY
    Posts
    248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And last I checked, Netscape STILL doesn't recognize color in <HR>'s yet

  6. #6
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Protoss
    And last I checked, Netscape STILL doesn't recognize color in <HR>'s yet
    Netscape = Mozilla. See my post above.

  7. #7
    SitePoint Guru okrogius's Avatar
    Join Date
    Mar 2002
    Location
    US
    Posts
    622
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To explain why... IE considers <hr> an inline element. Mozilla considers it (IMHO the correct implementation) as a block element.

    Specifying both color and background-color works well, but another solution is just do a display: block; (or inline) and define the single apropriate property.


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
  •