www.webdeveloper.com
Results 1 to 9 of 9

Thread: div on explorer have minimum height

  1. #1
    Join Date
    Jul 2005
    Posts
    197

    div on explorer have minimum height

    all i wanted is a div with 3px height!
    but ****en explorer will not do it
    i've found that when i put inside this div a 1x1px image it DOES get down to size.

    how do i force IE to show a div with very small heights (without the 1px image) ?

  2. #2
    Join Date
    Jul 2005
    Posts
    197
    this is getting WEIRD !!
    after some experiments i've found that i can put inside the div a comment <!-- -->
    and this will be enough !!

  3. #3
    Join Date
    Jun 2004
    Location
    4846′36″ N 910′48″ E
    Posts
    3,747
    yeah i also tried that..how weird..no explanation..(well yes, apart that IE sucks)

  4. #4
    Join Date
    Nov 2002
    Location
    XYZZY - UK
    Posts
    1,760
    I supose: No content = no height.

  5. #5
    Join Date
    Jun 2004
    Location
    4846′36″ N 910′48″ E
    Posts
    3,747
    hmm, if you give it a height of 3px, content or not, it should be 3px high.
    If it had no height at all, i would understand that it could be related to the lack of content..but it has some random height, which isn't margin/padding related..weird

  6. #6
    Join Date
    Jul 2005
    Location
    USA
    Posts
    3,910
    Quote Originally Posted by Kravvitz
    IE/Win won't let an element have a height that is less than its line-height.
    you can decrease the font-size and line-height OR use overflow:hidden
    IE6 is an antiquated piece of junk. (Read the quote.)
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

    Check out my blog.

  7. #7
    Join Date
    May 2005
    Posts
    2,040

  8. #8
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    IE wont let you have the height less than the line height IF the content is text. Even a single blank character counts as text. By NOT having any text content you can adjust the height to as small as you want.
    Stephen

  9. #9
    Join Date
    Jul 2005
    Location
    USA
    Posts
    3,910
    felgall, did you not read my reply?
    Learn CSS. | SSI | PHP includes | X/HTML Validator | CSS validator | Dynamic Site Solutions

    Design/program for Firefox (and/or Opera), apply fixes for IE, not the other way around.

    Check out my blog.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles