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.

Horizontal Line in IE6

Discussion in 'HTML & Website Design' started by twalters84, Apr 28, 2008.

  1. #1
    Greetings,

    I am trying to create a horizontal line using CSS (without an image). The <hr> element is not really as thick as I want it. Thus, I am trying something like this:

    div.hr
    {
    height: 2px;
    background: #000000;
    margin: 5px 0px 5px 0px;
    padding: 0px 0px 0px 0px;
    }

    This looks fine in IE7, Firefox, etc.
    SEMrush
    However, in IE6, the line looks like it is about 20 pixels in height.

    Does anybody know the proper adjustment I need to make so IE6 will look more like IE7?

    Thanks in advance!

    Sincerely,
    Travis Walters
     
    twalters84, Apr 28, 2008 IP
    SEMrush
  2. Greg-J

    Greg-J I humbly return to you.

    Messages:
    1,844
    Likes Received:
    153
    Best Answers:
    0
    Trophy Points:
    135
    #2
    You can use css to style an <hr> element.

    As for why this isn't working, it's because IE is saving enough room for text inside this div. Either set the text size to 1px or turn hide the overflow.
     
    Greg-J, Apr 28, 2008 IP
    twalters84 likes this.
  3. twalters84

    twalters84 Peon

    Messages:
    514
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hey there,

    Thanks a lot Greg!!! That solved the problem completely!!!

    You are the man!!!

    Sincerely,
    Travis Walters
     
    twalters84, Apr 29, 2008 IP