![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Guys - What's the purpose of "overflow: hidden;" in the following div class used to clear floats? .clear { clear: both; height: 1px; font-size: 1px; line-height: 1px; margin-top: -1px; overflow: hidden; } Thanks. Phil |
#3
| |||
| |||
|
|
What's the purpose of "overflow: hidden;" in the following div class used to clear floats? .clear { clear: both; height: 1px; font-size: 1px; line-height: 1px; margin-top: -1px; overflow: hidden; } |
#4
| |||
| |||
|
|
Phil, It will make sure that any content added to an element with that class will not cause it to stretch vertically. Anything past 1px will be truncated with no scrollbar. HTH, Randy What's the purpose of "overflow: hidden;" in the following div class used to clear floats? .clear { clear: both; height: 1px; font-size: 1px; line-height: 1px; margin-top: -1px; overflow: hidden; } |
#5
| |||
| |||
|
|
But it's redundant and unnecessary when used on the normal float clearer. I should have said that it would be really impossible to say for certain without also seeing the HTML context. -- Murray --- ICQ 71997575 Adobe Community Expert (If you *MUST* email me, don't LAUGH when you do so!) ================== http://www.dreamweavermx-templates.com - Template Triage! http://www.projectseven.com/go - DW FAQs, Tutorials & Resources http://www.dwfaq.com - DW FAQs, Tutorials & Resources http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes ================== "Randy Edmunds" <redmunds_nospam (AT) adobe (DOT) com> wrote in message news:e35bir$2jk$1 (AT) forums (DOT) macromedia.com... Phil, It will make sure that any content added to an element with that class will not cause it to stretch vertically. Anything past 1px will be truncated with no scrollbar. HTH, Randy What's the purpose of "overflow: hidden;" in the following div class used to clear floats? .clear { clear: both; height: 1px; font-size: 1px; line-height: 1px; margin-top: -1px; overflow: hidden; } |
#6
| |||
| |||
|
|
Thanks Guys. Other than "clear: both;" is any of this stuff really necessary just to clear a float? |
#7
| |||
| |||
|
|
You can also use <br style="clear: both;" in the code, after the floated div/s>, if its more suitable. div id="float1">Floated</div div id="float2">Floated</div br style="clear: both;" div id="notFloated">Not Floated</div |
![]() |
| Thread Tools | |
| Display Modes | |
| |