SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Evangelist
    Join Date
    Jun 2004
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hr not showing in FF

    Hi all,

    I have a simple display of hr. On IE, all fine, in FF3, it doesn't show. I can't rememeber that this happened before on other sites. Any idea why this goes wrong?

    Kind regards,
    M

  2. #2
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Without a link, or the complete markup, it's only a guess. <hr> works just fine in FF.

  3. #3
    SitePoint Evangelist
    Join Date
    Jun 2004
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, I know, so sth strange must be going on. The link to the page is http://www.webnology.be/coe/nl/index.php

  4. #4
    SitePoint Guru tictike's Avatar
    Join Date
    Apr 2008
    Location
    Canada
    Posts
    863
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should validate your page first. There are 66 errors.

  5. #5
    SitePoint Evangelist
    Join Date
    Jun 2004
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ooeps. I fixed most of the erros now, except for target="_blank", but still no solution. Any other ideas?

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    The hr isn't showing because you haven't given it a background:color.

    Code:
    hr {
        color: #FFFFFF;
        background:#fff;
        height: 2px;
        margin-top: 20px;
        margin-bottom: 20px;
    }

  7. #7
    SitePoint Guru tictike's Avatar
    Join Date
    Apr 2008
    Location
    Canada
    Posts
    863
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why does a background color make it work? Anytime I've ever used an hr element it has a default style/shows up. So, what about the code webnology prevented it from working?

  8. #8
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    An unstyled <hr> consists of borders, but you stripped all borders in your first reset rule.

  9. #9
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Also IE uses the color property to style the hr whereas most other browsers use the background property. In IE you cannot collapse the height of the margins on the HR either and it will always display differently to other browsers/

    I tend not to use an hr at all (if I do use it I will hide it) and use a border on an existing element instead).


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
  •