Jump to content

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/85525-cant-get-this-thing-centered/
Share on other sites

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...

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.