+ 1
How do i make the child <li> fill parent <ul> div in the nav bar?
4 Antworten
+ 2
option 1{
<ul> padding = 0
<li> width = 25%
}
or option 2{
<ul> padding = 0
<ul> display = flex
<li> flex-grow = 1
}
+ 1
Thankyou
+ 1
But why padding:0? What is setting the padding implicitly?
+ 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;
}