P3t3r Posted January 11, 2008 Share Posted January 11, 2008 Site works in non-IE browsers only for now, so you'll need Firefox or similar to see this. http://www.problem-solving.be/dir0/viewpage.php The roll-out menu on top should be centered, but somehow it doesn't. I tried everthing, align tr, align td, align div around it, the span class also contains center... what should I do to make this centered? Now there's over twice as much space on the left as on the right, and I've been trying for hours to center this properly... Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/85525-cant-get-this-thing-centered/ Share on other sites More sharing options...
P3t3r Posted January 11, 2008 Author Share Posted January 11, 2008 For the sake of completeness, this is the table's code. Regardless of what nav2 does, this should be centered, right?? <div align="center"><table width="100%" cellspacing="0" cellpadding="10" border="0" align="center"> <tr align="center"> <td align="center"><span class="nav2"> <ul> <li><a href="#">Forum Pages<!--[if IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul> <li><a href="portal.php">Home Page</a></li> <li><a href="index.php">yourdomain.com Forum Index</a></li> <li><a href="memberlist.php">Memberlist</a></li> <li><a href="groupcp.php">Usergroups</a></li> <li><a href="search.php">Search</a></li> </ul> {here some more menus} <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> </ul> <ul> <li><a href="privmsg.php?folder=inbox">You have no new messages<!--[if IE 7]><!--></a><!--<![endif]--> <!--[if lte IE 6]><table><tr><td><![endif]--> <ul> <li><a href="privmsg.php?folder=inbox">Inbox (aantal)</a></li> <li><a href="privmsg.php?folder=inbox&folder=outbox">Outbox</a></li> <li><a href="privmsg.php?folder=inbox&folder=sentbox">Sentbox</a></li> <li><a href="privmsg.php?folder=inbox&folder=savebox">Savebox</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--> </li> </ul> </span> </td> </tr> </table> </div> The cause is probably this piece of css: .nav2 ul li { float:left; position:relative; z-index:auto !important /*Non-IE6*/; z-index:1000 /*IE6*/; background: #C7D0D7; /*url(images/css/css_cat_light.jpg) repeat-x;*/ } but when I change the left into center, every menu is suddenly on its own line instead of nicely next to eachother... Quote Link to comment https://forums.phpfreaks.com/topic/85525-cant-get-this-thing-centered/#findComment-436556 Share on other sites More sharing options...
AV1611 Posted January 11, 2008 Share Posted January 11, 2008 ul is set to float left, and the menu is in the first td, so it will align left. Turn on table border so you can see your alignment. Quote Link to comment https://forums.phpfreaks.com/topic/85525-cant-get-this-thing-centered/#findComment-436890 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.