html background color not working | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

html background color not working

the background color on my navigation bar does not work. can you guys help? it is on the <ul> tag https://code.sololearn.com/W4QFzGPNa41t/?ref=app

13th Jul 2020, 4:13 PM
Shen Bapiro
Shen Bapiro - avatar
1 Answer
+ 3
When an element is floated, it is taken out of the normal flow of the document. Try to replace float: left with display: inline-block;
13th Jul 2020, 4:22 PM
Calviղ
Calviղ - avatar