My Little Help Desk - ASP Help Forum
My Little Help Desk - ASP Help Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
 All Forums
 My Little Help Desk - ASP Help
 Active Server Pages
 CSS Float problem
 New Topic  Reply to Topic
Author Topic  

newtoweb

1 Posts

Posted - 01/20/2010 :  16:30:55  Show Profile  Reply with Quote
When I use float in CSS, how do I stop divs that are lower from overlapping the float divs?

Administrator

28 Posts

Posted - 01/20/2010 :  16:33:15  Show Profile  Reply with Quote
If I understand you correctly, you should use clearfix in CSS to keep other divs from overlapping with floated divs. Try this:

In CSS:

/* Div Clear to Correct IE Display Issue */
.clearfix:after {
content:".";
display:block;
height:0;
clear:both;
visibility:hidden;
}

.clearfix {display:inline-block;}
/* Hide from IE Mac \*/
.clearfix {display:block;}
/* End hide from IE Mac */


Then, place this div below the floated div.
<div class="clearfix"></div>

That should solve your problem.
Go to Top of Page
  Topic  
 New Topic  Reply to Topic
Jump To:
My Little Help Desk - ASP Help Forum © mylittlehelpdesk.com Go To Top Of Page
Snitz Forums 2000