jasonc Posted September 11, 2010 Share Posted September 11, 2010 I have tried to get my menu in the middle but using text-align: center; and text: center all fail. what should i change to have the menu show in the middle of the page ? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> #header { margin:0; padding:20px 10px 0 10px; position:relative; height: 60px; font-size: 12px; } #header ul { list-style:none; margin:0; padding:0; position:relative; } #header li { float:left; margin:0; padding: 0 6px 0 6px; position:relative; color:#000; } #header .adminmenu { float:left; margin:0; padding: 0; position:relative; color:#000; } <div id="header"> <ul> <li><a href="">Welcome</a></li> <li><img src="images/split.gif" alt="" width="1" height="16"></li> <li><a href="">About us</a></li> <li><img src="images/split.gif" alt="" width="1" height="16"></li> <li><a href="">Vehicles</a></li> <li><img src="images/split.gif" alt="" width="1" height="16"></li> <li><a href="">Services</a></li> <li><img src="images/split.gif" alt="" width="1" height="16"></li> <li><a href="">Quote Me</a></li> <li><img src="images/split.gif" alt="" width="1" height="16"></li> <li><a href="">Bookings</a></li> <li><img src="images/split.gif" alt="" width="1" height="16"></li> <li><a href="">Accounts</a></li> <li><img src="images/split.gif" alt="" width="1" height="16"></li> <li><a href="">Contact us</a></li> </ul> <br style="clear: both;"> </div> Quote Link to comment https://forums.phpfreaks.com/topic/213176-how-do-i-center-my-menu/ Share on other sites More sharing options...
ram4nd Posted September 12, 2010 Share Posted September 12, 2010 if you want div in the middle use: margin:0 auto Quote Link to comment https://forums.phpfreaks.com/topic/213176-how-do-i-center-my-menu/#findComment-1110279 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.