I was asked to make a horizontal menu for my website, which in essence is just a unordered list, this is necessary. However I can not get it out of its "vertical state".
At the moment this is my HTML code for my list itself;
<ul id="horizontaal">
<li><a href="index.html">Index</a></li>
<li><a href="mijnsoftware.html">Mijn Software</a></li>
<li><a href="browsers.html">Browsers</a></li>
<li><a href="registratie.html">Registratie</a></li>
</ul>
In CSS this is;
ul li {
background-color: grey;
border: 5px solid #999999;
list-style-type: none;
margin-bottom: 5px;
margin-top: 5px;
text-align: center;
padding: 3px;
width: 10%;
float: left;
clear: both;
width:150px;
}
ul {
margin-bottom: 70%;
margin-right: 100px;
float: left;
}
And for this horizontal list in special:
#horizontaal {
width: 100%;
}
#horizontaal li {
width: 10%;
margin-right: 0px;
margin-left: 0px;
float: left;
display: inline;
}
It is required that the list takes up around 100% of the width of my screen.
https://i.stack.imgur.com/gQMjV.png
EDIT:
I didn't notice I had that much blatant errors in my code, I'm sorry for that I should've taken some more time before posting; my sincere apologies.
As for the code this is what I have now:
ul li {
background-color: grey;
border: 5px solid #999999;
list-style-type: none;
margin-bottom: 5px;
margin-top: 5px;
text-align: center;
padding: 3px;
width: 150px;
}
ul {
margin-bottom: 70%;
margin-right: 100px;
float: left;
}
#horizontaal {
width: 100%;
}
#horizontaal li {
width: 10%;
margin-right: 0px;
margin-left: 0px;
display: inline;
}
My list seems to be aligned horizontally now, but my excercise states the following: "Make the list items float. The list itself may not float." But I've read on the comments that the inline display cannot be in conjunction with float?