Learn CSS float in 3 minutes 🎈

preview_player
Показать описание
CSS float property tutorial example explained

#CSS #float #property

.box{
width: 100px;
height: 100px;
border: 1px solid;
font-size: 40px;
text-align: center;
background: tomato;

float: right;
}
p{
clear: both;
}
Рекомендации по теме
Комментарии
Автор

/* style.css */

.box{
width: 100px;
height: 100px;
border: 1px solid;
font-size: 40px;
text-align: center;
background: tomato;

float: right;
}
p{
clear: both;
}

<!DOCTYPE html>

<html>
<head>
<title>My first website</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<!-- float = positions an element to the
left or right side of a container.

ex. Popular for wrapping
elements around images. -->

<div class="box">Box1</div>
<div class="box">Box2</div>
<div class="box">Box3</div>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae maiores beatae earum consequatur nostrum! Harum aliquid magnam, minima dolor, rerum mollitia fugiat labore temporibus consequatur eveniet aut sit reprehenderit in.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae maiores beatae earum consequatur nostrum! Harum aliquid magnam, minima dolor, rerum mollitia fugiat labore temporibus consequatur eveniet aut sit reprehenderit in.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quae maiores beatae earum consequatur nostrum! Harum aliquid magnam, minima dolor, rerum mollitia fugiat labore temporibus consequatur eveniet aut sit reprehenderit in.</p>

</body>
</html>

BroCodez
Автор

There are no empty words. Perfect explanation in 3 minutes.

sezermercan
Автор

I think this is the best & the shortest explaination of float & clear css properties i have ever seen. Thank you!

khalidelgazzar
Автор

That was just great dude. I watched a few more lengthy videos and none of them explained this topic as precisely as you did, thanks.

edwinlopez
Автор

Dude I LOVE YOU THAT WAS SO SIMPLE YET BEAUTIFULLY EXPLAINED!!!

xyzabcjkl
Автор

I’ve been using MDN and the specs to get a handle on HTML / CSS. In trying to be exhaustive I think, and despite great intentions, their approach can confuse.

Your explanation is short, clear and intuitive in a way I think is more consistent with what the folks who designed “float” would want.

Nice work!

robwalker
Автор

Thanks. Clear explanation within just a few minutes.

x-buster
Автор

Short and 100% to the point... thanks!

leonelmessi
Автор

I'm about half way of is css course, your java programming and html lessons help me alot. Thank you so much! 😊

marxLz
Автор

Good work bro I learnt your python course it was very helpful after that I found that you teach us various coding I was amazed and now I subscribed your channel also recommended my friends to learn this. Thank you very much 🙏🙏

knightfade
Автор

you are amazing and your tutorials are amazing too!!

NarutoUzumakiDatebayo
Автор

Short and sweet! Thank you! This helped a lot

portfedh
Автор

Awesome 😎 work. I have learned a lot from your brief and clear tutorials.
#bro code

bisharmohamedibrahim
Автор

It's very understandable to me. Thank you a lot.

Cotta_
Автор

Oh.... They aaallll FLOAT !
I see what you did in here ;)

domi_dreams
Автор

Thanks a lot brother appreciate ur work 🖐

_farooqueshaikh
Автор

how was this more useful than my 1 week of class...

carterpierre
Автор

so what is the difference between inline-block and float. I mean both ways I can arrange the divs right next to each other.

UEUnderCover
Автор

Thank you, finally I could understand it

ronaldoucl
Автор

Okay, I have one little problem with the float. I have an image below the image I have the figcaption below that I have some text. I just want the text to float not the figcaption. How to fix this little problem?

brianjett