HomeНаука и техникаRelated VideosMore From: optikalefx

Floating and Clearing with CSS - fixing all those problems

154 ratings | 22565 views
When you float elements you need to clear afterwards so you can add content after. HOWEVER if you just set the parent to overflow:auto, it fixes everything
Html code for embedding videos on your blog
Text Comments (16)
Raihan khan (1 year ago)
having css issue don't take stress I am here to help https://www.fiverr.com/raihan660/fix-bugs-of-you-html-and-css-file?arrived_from_manage_gigs=true&display_share=true
sifat raju (1 year ago)
if anyone have any bug in their web page then you can visit here... i will fix it with a little cost.. https://www.fiverr.com/sifatraju59/fix-any-html-css3-and-bootstrap-issues
datta pavan (1 year ago)
thank you very much
Shortcut Romeo (2 years ago)
thanks a lot
Thank you for the lesson. GOD bless you.
sachin devkar (4 years ago)
thanks a lot gr8 video
top40productions (4 years ago)
Fantastic clear advice, thank you.
Talha Badar (5 years ago)
*divs
Talha Badar (5 years ago)
how can i transfer the control between two 'div'. actually i have two dis both of them have unordered list but when i open in the browser it i cant navigate between two divs. can you please tell me how to navigate between divs
Ron Chistik (5 years ago)
Great example!
sharkyvankoten (6 years ago)
Nice and crystal clear explanation.
Ziv (6 years ago)
Thanks.
optikalefx (8 years ago)
@Jackques so float makes an element inline basically. so that means shit can go on both sides of it. When you clear left, clear right or clear both, you are saying that this element can't have shit next to it anymore. The reason for using clear is because floats are usually applied in a cascading manner. So its necessary to pick then end element and clear it. The overflow:hidden works, because browsers are messed up, and it fixes the initial problem that the container needs to contain.
Rickster8989 (8 years ago)
hey there, nice video! I was hoping you could help me with understanding how floating and clearing exactly works. I know that floating should remove the elements from the normal flow of the page and just put them inline next to eachother in the given direction' but.. what does 'clear'' then exactly do? why did the footer go down when u assigned the overflow hidden property to div id=boxes container?
optikalefx (8 years ago)
@nikkitoni01 Try getting rid of the height all together
Clearly understand all of your video thank you

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.