+ 1

How do i make the child <li> fill parent <ul> div in the nav bar?

https://code.sololearn.com/WQviTuGPsfaW/?ref=app

16th Jun 2020, 4:18 AM
Sameer Crestha
Sameer Crestha - avatar
4 Antworten
+ 2
option 1{ <ul> padding = 0 <li> width = 25% } or option 2{ <ul> padding = 0 <ul> display = flex <li> flex-grow = 1 }
16th Jun 2020, 4:44 AM
JME
+ 1
Thankyou
16th Jun 2020, 5:09 AM
Sameer Crestha
Sameer Crestha - avatar
+ 1
But why padding:0? What is setting the padding implicitly?
16th Jun 2020, 5:32 AM
Sameer Crestha
Sameer Crestha - avatar
+ 1
By default <ul> has padding on the left as lists are usually indented. this is the full default css ul { display: block; list-style-type: disc; margin-top: 1em; margin-bottom: 1 em; margin-left: 0; margin-right: 0; padding-left: 40px; }
16th Jun 2020, 5:50 AM
JME