Jump to content

[SOLVED] My mainpage wont shift in center


TheFreak

Recommended Posts

I am trying to shift my "maincont" and everything in the center,but for some reason it wont,even if i used align.Heres my code.

 

HTML:

<body>
<div align="center" class="maincont">
<div id="menucontainer" >
    <div id="menunav" >
        
        <ul>
            <li><a href="" title="css website navigation menus" class="current"><span>Movies</span></a></li>
            <li><a href="" title="css website navigation menus"><span>Television</span></a></li>
            <li><a href="" title="css website navigation menus"><span>Documentries</span></a></li>
            <li><a href="" title="css website navigation menus"><span>Plays</span></a></li>
            <li><a href="" title="css website navigation menus"><span>Kids</span></a></li>
            <li><a href="" title="css website navigation menus"><span>Videos</span></a></li>
            <li><a href="" title="css website navigation menus"><span>Stores</span></a></li>
        </ul>
    </div>
</div>
</div>


</body>

 

CSS:

*{
list-style:none;
}
#menucontainer{
        position:relative;
height:50px;
color:#FFFFFF;
background:#383636;
width:100%;
font-family:Helvetica,Arial,Verdana,sans-serif;
}
#menunav{
position:relative;
height:38px;
font-size:12px;
text-transform:uppercase;
font-weight:bold;
background:#fff url(images/background.jpg) repeat-x bottom left;
padding:0 0 0 20px;}

#menunav ul{
margin:0;
padding:0;
list-style-type:none;
width:auto;	
float:left;}

#menunav ul li{
display:block;
float:left;
margin:0 1px;}

#menunav ul li a{
display:block;
float:left;
color:#EAF3F8;
text-decoration:none;
padding:0 0 0 20px;
height:38px;}

#menunav ul li a span{
padding:12px 20px 0 0;
height:21px;
float:left;}

#menunav ul li a:hover{
color:#fff;	
background:transparent url(images/hover.jpg) repeat-x bottom left;}

#menunav ul li a:hover span{
display:block;
width:auto;
cursor:pointer;}
#menunav ul li a.current, #menunav ul li a.current:hover{
color:#fff;
background:#1D6893 url(images/left.jpg) no-repeat top left;
line-height:275%;}
#menunav ul li a.current span{
display:block;
padding:0 20px 0 0;
width:auto;
background:#383636 url(images/right.jpg) no-repeat top right;
height:38px;}
.maincont {
	border-style: solid;
align:center;
border-width: 1px;
width: 900px;
height: 900px
}

Link to comment
Share on other sites

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.