I have a section with Previous, Next and Title Links for my pages. I want this section to be styled so that the ‘Next’ Link will float to the right, The ‘Previous’ to the left and the title / ‘home’ to be in the middle.
It is centering the title (class=home) that is causing the problems, as I cannot float it in the middle.I tried moving it from the left by 30% but this does not work consistently to center it when I have larger page titles
HTML
<div id=”prev_next”>
<ul class=”navigation”>
<li class=”next”><a href=””>NEXT</a></li>
<li class=”previous”><a href=””>PREVIOUS</a></li>
<li class=”home”><h1>Home</h1></li>
</ul>
</div>
CSS
#prev_next
{
margin-left:-28px;
margin-right:-35px;
height:37px;
width:537px;
}
ul.navigation li
{
display: inline;
background-image:none;
}
ul.navigation a:link, ul.navigation a:visited, ul.navigation a:active
{
background-image:none;
}
ul.navigation li.home
{
float:left;
font-weight:bold;
color:#666666;
position:relative;
left:30%;
}
ul.navigation li.next
{
float: right;
margin-top:12px;
padding-right:42px;
}
ul.navigation li.previous
{
float: left;
margin-top:12px;
}
Any way I can center this value using css?