This is a discussion on "How to get a div less than 20px height IE6" within the Web Page Design section. This forum, and the thread "How to get a div less than 20px height IE6 are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
How to get a div less than 20px height IE6
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
How to get a div less than 20px height IE6
Hi I have just noticed that IE6 has a weird default that does not allow you to have a div with a height less than 20px even if you specify it to be 1px. In FF the code is displayed correctly. I tried setting the margins to 0 but this did not work. As there is no content in the div I am a little puzzled. Any help Yes please
css:
|
|
|
|
|||
|
Re: How to get a div less than 20px height IE6
Did you try to reset the padding as well?
May I ask why you are using a 1px high div. It looks like you are doing it to get a 1px thick line. Why not just use a
Have you got a screen dump of, or link to, the site or a mock-up? What exactly are you trying to achieve here? Pete. |
|
|||
|
Re: How to get a div less than 20px height IE6
Try this in the <head> of your html:
|
|
|||
|
Re: How to get a div less than 20px height IE6
Quote:
|
|
|||
|
Re: How to get a div less than 20px height IE6
Could you psot your solution incase anyone else has the same problem?
Sorry I haven't a clue why this happens. Pete. |
|
|||
|
Re: How to get a div less than 20px height IE6
Quote:
Its not a margin or pading problem. Yes you are right about the line thing. What I wanted was a dashed line which I made like this:
|
|
|||
|
Re: How to get a div less than 20px height IE6
Quote:
|
|
|||
|
Re: How to get a div less than 20px height IE6
It's odd, it must be one of IE's quirks and lets face there are a few. IE7 is ok but you're often fighting a losing battle with IE6.
Glad you found a solution, I'll bear it in mind in future. By the way, you should get into the habit of writing your css shorthand. So you have:
|
![]() |
| Tags |
| 20px height, div, ie6 |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 100% height | RZX Developer | Web Page Design | 11 | Mar 29th, 2008 10:23 |
| CSS Div height problem | dryjoy | Web Page Design | 1 | Jan 6th, 2008 18:05 |
| How to make a table height equal to the browser height ? | subhadip | Starting Out | 4 | Sep 20th, 2007 07:56 |
| 100% div height | jimz | JavaScript Forum | 2 | Mar 22nd, 2006 00:53 |