What do you use to set the box place ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

What do you use to set the box place ?

hello guy, I saw in html and css that we have a lot of possibilities to set an element place. we can use float right or we can set the margin left to put the box on the right for exemple. Now my question is : with all the possibilities to set box place, is there a best methode to use also for the search engine or it doesn't matter ?

29th Oct 2018, 5:42 AM
Anthony Van Den Ostende
4 Answers
+ 3
You may want to learn about CSS grid (https://css-tricks.com/snippets/css/complete-guide-grid/) if you are wanting great, adjustable box placement no matter the screen size. The next best thing to CSS grid is using flexbox. If you want to learn how to use flexbox I recommend this game https://flexboxfroggy.com/ which is good for all ages. I even refer to it when I forget something lol. Here is a demo I just wrote up for flexbox https://code.sololearn.com/W4f67woKOP8v/#css
29th Oct 2018, 5:52 PM
Logan
Logan - avatar
+ 2
you can use position property in css!! eg:- position: absolute; top: 100px; left: 200px;
29th Oct 2018, 7:07 AM
Suraj Jha
Suraj Jha - avatar
+ 2
thanks a lot. thats what I was looking for :)
29th Oct 2018, 7:07 PM
Anthony Van Den Ostende
0
yes, I know but I would like to know if every way to do it have the same importance or some are bad practice ?
29th Oct 2018, 2:45 PM
Anthony Van Den Ostende