HighDots Forums  

div height problem

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss div height problem in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
KiwiBrian
 
Posts: n/a

Default div height problem - 03-04-2005 , 01:14 PM






I have been unable to get a div to have a height less than about 20 pix in
IE6.
Is there some css that I can use as an in-line style that will guarantee
that the empty div that it is applied to will have 5 pixels height?

TIA
Brian Tozer



Reply With Quote
  #2  
Old   
phil_gg04@treefic.com
 
Posts: n/a

Default Re: div height problem - 03-04-2005 , 01:34 PM






Quote:
I have been unable to get a div to have a height less than about 20
pix in
IE6. Is there some css that I can use as an in-line style that will
guarantee
that the empty div that it is applied to will have 5 pixels height?
You need to set the font-size to something small, eg. 1px, since IE
gives all divs the height of one line of text even if there are no
characters present.

Worry a bit about users who set a minimum font size. I think you'll be
OK as IE doesn't allow users to do this, and other browsers that do
allow it don't impose it when the div is empty.

--Phil.



Reply With Quote
  #3  
Old   
KiwiBrian
 
Posts: n/a

Default Re: div height problem - 03-04-2005 , 03:00 PM



Thanks Phil.
Brian

<phil_gg04 (AT) treefic (DOT) com> wrote

Quote:
I have been unable to get a div to have a height less than about 20
pix in
IE6. Is there some css that I can use as an in-line style that will
guarantee
that the empty div that it is applied to will have 5 pixels height?

You need to set the font-size to something small, eg. 1px, since IE
gives all divs the height of one line of text even if there are no
characters present.

Worry a bit about users who set a minimum font size. I think you'll be
OK as IE doesn't allow users to do this, and other browsers that do
allow it don't impose it when the div is empty.

--Phil.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.