Results 1 to 4 of 4

Thread: Help with a modified Solid Block Menu.

  1. #1
    Join Date
    Jul 2007
    Posts
    9
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Help with a modified Solid Block Menu.

    Hi, I am using a highly modified form of the Solid Block Menu. I am trying to center the blocks in the menu, but nothing I have seen on here has worked. I am using IE 6.

    Here is the CSS:
    body
    {
    margin: 0px;
    padding: 0px;
    text-align:center;
    }


    ul.toplink{
    margin: 0 auto;
    text-align:center;
    padding: 0;
    font: bold 13px Arial;
    width: 100%;
    background: black url(images/navi_back.png) center center repeat-x;
    height:57px;
    list-style-type:none;
    }

    ul.toplink li{
    display: inline;
    width: 117px;
    height: 57px;
    list-style-type:none;
    text-align:left;
    }

    .toplink li a{
    margin:0px auto;
    float: left;
    color: #999999;
    padding: 20px 0px;
    text-decoration: none;
    background: black url(images/navi_1.png);
    background-repeat: no-repeat;
    width: 117px;
    text-align:center;
    }

    .toplink li a:visited{
    color: #999999;
    }

    .toplink li a:hover, .toplink li .current{
    color: white;
    }

    p.iepara{ /*Conditional CSS- For IE (inc IE7), create 1em spacing between menu and paragraph that follows*/
    padding-top: 1em;
    }

    #last{
    background:none;
    }


    Here is the HTML:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>Robot Casserole 1736</title>
    <link href="base.css" rel="Stylesheet" type="text/css" />
    </head>
    <body>
    <ul class="toplink" align="center">
    <li><a href="#">Home</a></li>
    <li><a href="#" class="current">About Us</a></li>
    <li><a href="#">FIRST</a></li>
    <li ><a href="#">Resources</a></li>
    <li><a href="#">Forum</a></li>
    <li><a id="last" href="#">Contact Us</a></li>
    </ul>
    </body>
    </html>

    I would greatly appreciate the help, thanks.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try the following.
    Code:
    ul.toplink li{
    display: inline;
    width: 117px;
    height: 57px;
    list-style-type:none;
    text-align:center;
    margin: 0 auto;
    }
    Jeremy | jfein.net

  3. The Following User Says Thank You to Nile For This Useful Post:

    RGStrat (03-01-2009)

  4. #3
    Join Date
    Oct 2008
    Location
    kolkata, india
    Posts
    75
    Thanks
    2
    Thanked 10 Times in 10 Posts

    Default

    Code:
    body
    {
    margin: 0px;
    padding: 0px;
    text-align:center;
    }
    div.main{
    	background: black url(images/navi_back.png) 0 0 repeat-x;
    	height:57px;
    	overflow:hidden;
    }
    
    ul.toplink{
    margin: 0 auto;
    text-align:center;
    padding:0;
    font:bold 13px/57px Arial;
    list-style-type:none;
    width:705px;
    }
    
    ul.toplink li{
    display: inline;
    list-style-type:none;
    }
    
    .toplink li a{
    color: #999999;
    text-decoration: none;
    background:black url(images/navi_1.png) 0 0 no-repeat;
    display:block;
    width: 117px;
    float:left;
    }
    
    .toplink li a:visited{
    color: #999999;
    }
    
    .toplink li a:hover, .toplink li .current{
    color: white;
    }
    
    p.iepara{ /*Conditional CSS- For IE (inc IE7), create 1em spacing between menu and paragraph that follows*/
    padding-top: 1em;
    }
    
    #last{
    background:none;
    }
    HTML Code:
    <div class="main">
    <ul class="toplink">
    <li><a href="#">Home</a></li>
    <li><a href="#" class="current">About Us</a></li>
    <li><a href="#">FIRST</a></li>
    <li ><a href="#">Resources</a></li>
    <li><a href="#">Forum</a></li>
    <li><a id="last" href="#">Contact Us</a></li>
    </ul>
    </div>
    u can try this code

  5. The Following User Says Thank You to monicasaha For This Useful Post:

    RGStrat (03-01-2009)

  6. #4
    Join Date
    Oct 2008
    Location
    kolkata, india
    Posts
    75
    Thanks
    2
    Thanked 10 Times in 10 Posts

    Smile

    if u dont wanna try to make the with fixed of the ultag.. u can also try this code
    Code:
    body
    {
    margin: 0px;
    padding: 0px;
    text-align:center;
    }
    div.main{
    	background: black url(images/navi_back.png) 0 0 repeat-x;
    	height:57px;
    	overflow:hidden;
    	width:100%;
    }
    
    ul.toplink{
    margin: 0 auto;
    text-align:center;
    padding:0;
    font:bold 13px/57px Arial;
    list-style-type:none;
    width:100%;
    }
    
    ul.toplink li{
    display: inline;
    list-style-type:none;
    }
    
    .toplink li a{
    color: #999999;
    text-decoration: none;
    background:black url(images/navi_1.png) 0 0 no-repeat;
    padding:0 20px;
    
    }
    
    .toplink li a:visited{
    color: #999999;
    }
    
    .toplink li a:hover, .toplink li .current{
    color: white;
    }
    
    p.iepara{ /*Conditional CSS- For IE (inc IE7), create 1em spacing between menu and paragraph that follows*/
    padding-top: 1em;
    }
    
    #last{
    background:none;
    }



    best of luck

  7. The Following User Says Thank You to monicasaha For This Useful Post:

    RGStrat (03-01-2009)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •