Float bug fix in div to expand
Many of would find a problem when using a block(div) called a container with the background color, where you don't want to use float or height to the div. And in the inner div of the container you want to give float to it.
You can find this issue in most of the browser like ie, firefox, the container will not expland as the inner div.
For Example:
HTML:
<div class="container">
<div class="inner_div">
blablabla <br> blablabla <br> blablabla<br>
</div>
</div>
CSS:
.container{width:300px;background:red;}
.inner_div{float:left;width:200px;font:12px arial;}
The red background in the container div will not expand when you add content to the inner div. So here is a simple trick to get the container div to expand.
Just add
.container{overflow:hidden;}
Will make the job easy.
You can find this issue in most of the browser like ie, firefox, the container will not expland as the inner div.
For Example:
HTML:
<div class="container">
<div class="inner_div">
blablabla <br> blablabla <br> blablabla<br>
</div>
</div>
CSS:
.container{width:300px;background:red;}
.inner_div{float:left;width:200px;font:12px arial;}
The red background in the container div will not expand when you add content to the inner div. So here is a simple trick to get the container div to expand.
Just add
.container{overflow:hidden;}
Will make the job easy.
6 Comments:
Yes, This really worked.
Satalaj.
thanks for this informative blog. I m going to visit your blogs regularly to know about the recent techniques and technologies in development. If you also care about look of your project you could simply use the after effects templates so as to complete it fast.
This has been a challenging time, and I appreciate you so much.
Regards: office.com/setup
You have no idea how much your help has meant.
Regards: mcafee.com/activate
There was nothing random about your acts of kindness. Thank you for all you have done
Regards: mcafee.com/activate
You took common courtesy to an uncommon level. We’re so grateful for your help.
Regards: mcafee.com/activate
Thank you for always remembering to change the oil and get the car inspected.
Regards: norton.com/setup
You went above and beyond, and I am touched and grateful.
Regards: norton.com/setup
thanks sir for sharing me this amazing knowledgeable site
top digital marketing institute in delhi
digital marketing course in ghaziabad
led tv repairing course
The Gyansagar
digital marketing course in noida
led tv repairing course
WELCOME TO OUR INSTITUTE
AIDM is a premier institute in various digital marketing domains like SEO, SMO, PPC, ORM, Google Analytics, Email Marketing, Affiliate Marketing and Content Marketing.
AIDM ADDRESS :- A-13, Mohan Park, Laxmi Nagar Delhi - 110092
+91-9205903598
Mon to Sat 9am to 6 pm
info@aidm.org.in
Send us your query anytime!
Post a Comment
Subscribe to Post Comments [Atom]
<< Home