+ 3

How to put 2 divs next to each other using ONLY HYML

Hi SoloLearn. I am wondering how to put 2 divs next to each other using just HTML. I am doing challenge and it requires me to use just HTML not CSS(float:left;) Thank you! Have a great day! E.g: Zone 1 Zone 2 Zone 3 Footer

15th Mar 2019, 11:59 AM
Stefan Secrieru
Stefan Secrieru - avatar
7 ответов
+ 7
Divs are block elements and normally without changing something, they can’t go side by side. You can use float, position, or display, but they are all css options to change the behavior or position of the div. Now using a table, and placing the divs in cells, thats not css. ;)
15th Mar 2019, 12:55 PM
Mike
Mike - avatar
+ 2
Stefan Secrieru div are block level element and by default always start on a new line but there is a CSS trick that can make it possible set Zone3 position to flex and display to inline like this <style> .Zone3{ position:flex; display :inline; } </style> Using CSS column and row
15th Mar 2019, 4:22 PM
George S Mulbah II
George S Mulbah II - avatar
+ 2
George S Mulbah Thank for your help!
16th Mar 2019, 9:43 AM
Stefan Secrieru
Stefan Secrieru - avatar
+ 2
Stefan Secrieru I prepare a code on it try to read the code and understand how I did it you could copy it if you like because it just a tutorial for this issue https://code.sololearn.com/WyZ7cZyR1XrF/?ref=app https://code.sololearn.com/WyZ7cZyR1XrF/?ref=app
17th Mar 2019, 1:00 AM
George S Mulbah II
George S Mulbah II - avatar
+ 1
Mike Thank you! I think that is it.
15th Mar 2019, 2:45 PM
Stefan Secrieru
Stefan Secrieru - avatar
+ 1
George S Mulbah answers will put divs beside each other, but they still use css and the question specifically said “just html not css”.
17th Mar 2019, 1:48 AM
Mike
Mike - avatar
0
Thank you very much for your help!
17th Mar 2019, 7:48 AM
Stefan Secrieru
Stefan Secrieru - avatar