Jump to content

Horizontal Line in IE6

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#1
twalters84

twalters84

    Learning Programmer

  • Members
  • PipPipPip
  • 57 posts
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.

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
spammy sig deleted

#2
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Internet Explorer has always been bad at interpreting web pages. IE 7 and Firefox 2 are used by about 97% of users at the last count, so you should be OK. :)
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#3
twalters84

twalters84

    Learning Programmer

  • Members
  • PipPipPip
  • 57 posts
Hey there,

I am concerned about this problem.

Browser Statistics

According to the website above, during march 2008, 30.1% of the population is still using IE6.

If anybody has a solution, please feel free to share :)

Thanks again.

Sincerely,
Travis Walters
spammy sig deleted

#4
twalters84

twalters84

    Learning Programmer

  • Members
  • PipPipPip
  • 57 posts
Hello again,

Here is the solution:

"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."

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

Maybe this will help somebody in the future. Thanks again.

Sincerely,
Travis Walters
spammy sig deleted

#5
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Ah - maybe the div element isn't the best element to use. There's a website where you type in the site, and it displays it as it would appear within different browsers, at different resolutions. I forgot the name, but I'll post it if I remember.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums