Is it wrong to use the position attribute to position elements instead of the float?

Asked

Viewed 59 times

2

Is it wrong to use the position attribute to position elements on the page instead of the float ? If so, why ?

  • 2

    Wrong for what? If it was wrong it would not exist.

  • I read on the internet that the position should be used only for minor changes in the page, and to define the elements within the layout was to use float

  • 2

    The float was initially designed to allocate texts around images thus giving a floating effect, but over time has been adapting to the relative layout, it can be said that it is a good method, but the others also have their importance and can be used, even recommend the use of flex-box to position the elements on the page, today is the most complete method, and we do not use float.

  • 1

    Kills responsiveness ... the effect of Xpixel on a full HD monitor is quite different from the effect on a smartphone.

1 answer

1

If all content on your page is static, I see no problem using position to assemble the structure. If it is not static hardly you will be able to structure properly without float.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.