Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Flexible horizontal navigation with equal distance between nav elements Re: Flexible horizontal navigation with equal distance between nav elements

#93980
davidlab.be
Participant

i quickly through this together. Not exactly what you may be looking for, but same idea and browser friendly.


  • Element 1

  • El 2

  • Element three

  • Element 4

ul{
max-width: 100%;
}

li{
float:left;
}

li.first-li{
text-align: left;
margin-right: 2%;
width: 23%;
background-color:red;
}

li.middle-li{
text-align: center;
margin: 0 2%;
width: 21%;
background-color:green;
}

li.last-li{
text-align:right;
margin-left: 2%;
width: 23%;
background-color:blue;
}