How to make spacing in html5 ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to make spacing in html5 ?

like if organizing navigation items and you want to evenly seperate them .

26th Jan 2018, 8:38 PM
Cihad Jasem Alhaji
Cihad Jasem Alhaji - avatar
5 Answers
+ 21
If you want to make free space between navigation items, try flex. In this case, you can use the justify-content property with the following values: space-between, space-around, space-evenly. https://css-tricks.com/snippets/css/a-guide-to-flexbox/ https://css-tricks.com/flexbox-bar-navigation/ https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox
26th Jan 2018, 8:59 PM
NezhnyjVampir
+ 3
Just do any 15 minutes tutorial on YouTube on flexbox, and you ll feel awesome. display : flex; is ur answer 👍 and then justify-content: space-around; or space-between;
27th Jan 2018, 8:25 AM
Morpheus
Morpheus - avatar
+ 2
Just use margin or padding for menu elements
26th Jan 2018, 8:50 PM
ThreeG
ThreeG - avatar
+ 2
or study real time from this code, thx to Burey https://code.sololearn.com/Wqwc2gEQ7sR7/?ref=app
27th Jan 2018, 8:29 AM
Morpheus
Morpheus - avatar
0
Use CSS e.g. min-width: 50px;
27th Jan 2018, 2:13 AM
Calviղ
Calviղ - avatar