B
B
bubihart2016-11-23 19:09:03
css
bubihart, 2016-11-23 19:09:03

Is it worth learning float?

Began to understand with HTML/CSS. Is it worth it to type with floats, or should you learn flexbox right away?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
I
iBird Rose, 2016-11-23
@iiiBird

it doesn't work that way. you should know everything anyway. and float and flex and inline-block and even display: table. from the fact that you make the grid according to flex - this does not mean that in other places in the project you will not have to use float. or something else.

I
Ivanq, 2016-11-23
@Ivanq

IMHO , but it's unlikely that anyone will disagree
with everyone's love of float. Sorry, they don't like it. How many articles have there been like "Float doesn't work for you either?", "float and css magic", etc.
Basically, float should be used for wrapping: https://jsfiddle.net/Ivanq/xqd0hoy7/
Often float is used to line up: https://jsfiddle.net/Ivanq/xqd0hoy7/1/
But such code cannot be supported . It's worth starting with the fact that float: right doesn't work quite the way you'd expect. This code will put first element 3, then 2, then 1.
For now it is better to use inline-block, it is supported by all normal browsers.
https://jsfiddle.net/Ivanq/xqd0hoy7/3/also aligns in a row, but with the help of inline-block. Of course, inline-block also has pitfalls, but in any case, float is better not to use.
This is IMHO.

O
Oleg, 2016-11-23
@werty1001

Of course, you need to understand how it works, it’s better to typeset on flexbox if you don’t need support for old donkeys.

W
wizzzart, 2016-11-23
@wizzzart

The question sounds something like this: "I started building a house. Is it worth bothering with the foundation, or should I immediately go to the ceiling?"

E
Eugene Volf, 2016-11-23
@Wolfnsex

It is worth studying it so that you can forget it later and never use it :)
You must understand the principles of work, regardless of how useful this property is or not... For layout "on a live" project - definitely no floats or reduce their number to the minimum possible. There are many other options for aligning elements, and if float is not wrapping text around an image, in 95% of cases, this indicates that the layout designer simply does not know (read, does not know how) better solutions.
By the way, Float and FlexBox are cardinally different things, by the nature. FlexBox is about displaying/distributing content, while floats are floating elements that don't stretch or distribute in any way, let alone scale automatically.

U
Umid, 2016-11-23
@DarCKoder

SKILL LEVEL depends on your knowledge.
It is in-depth knowledge that distinguishes "MOLYAR" from "ARTIST".
Exactly the same can be said about "MATHEMATICS" and physics, too, for the life of a programmer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question