HighDots Forums  

Clearing Floats?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Clearing Floats? in the Macromedia Dreamweaver forum.



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

Default Clearing Floats? - 05-01-2006 , 11:45 AM






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



Reply With Quote
  #2  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: Clearing Floats? - 05-01-2006 , 12:03 PM






None. As with most of the rest of the styles there too.

--
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
==================


"Phil Papeman" <plpapeman (AT) nospam_comcast (DOT) net> wrote

Quote:
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





Reply With Quote
  #3  
Old   
Randy Edmunds
 
Posts: n/a

Default Re: Clearing Floats? - 05-01-2006 , 12:04 PM



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


Quote:
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;
}

Reply With Quote
  #4  
Old   
Murray *ACE*
 
Posts: n/a

Default Re: Clearing Floats? - 05-01-2006 , 12:18 PM



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

Quote:
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;
}



Reply With Quote
  #5  
Old   
Phil Papeman
 
Posts: n/a

Default Re: Clearing Floats? - 05-01-2006 , 12:44 PM



Thanks Guys.

Other than "clear: both;" is any of this stuff really necessary just to
clear a float?

Phil


"Murray *ACE*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote

Quote:
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;
}





Reply With Quote
  #6  
Old   
Osgood
 
Posts: n/a

Default Re: Clearing Floats? - 05-01-2006 , 12:56 PM



Phil Papeman wrote:

Quote:
Thanks Guys.

Other than "clear: both;" is any of this stuff really necessary just to
clear a float?
NO.

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>



Reply With Quote
  #7  
Old   
Osgood
 
Posts: n/a

Default Re: Clearing Floats? - 05-01-2006 , 01:01 PM



Osgood wrote:


Quote:
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

You could also just use clear both on the #notFloated <div>

#notFloated {
clear: both;
}


<div id="float1">Floated</div>
<div id="float2">Floated</div>
<div id="notFloated">Not Floated</div>


There are about three of four combinations you can use. Some work in
some senarios and some don't work that well. So you have to test them
out to see what works best and where.







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 - 2008, Jelsoft Enterprises Ltd.