[CSS] NAVI ZENTRIEREN PROBLEM

12/16/2012 14:30 Cxyz#1
hey leute,
habe ein Problem undzwar der Inhalt meiner Navigation wird immer linksbündig angezeigt also so:

[Only registered and activated users can see links. Click Here To Register...]

und ich möchte das es so angezeigt wird:

[Only registered and activated users can see links. Click Here To Register...]

also in der Mitte (zentriert)

hier der Code


PHP Code:
#navi {
    
background:url(img/navi.pngno-repeat top center;
    
height:100px;
    
margin:0 auto;
}

    
#navi ul {
        
width:1000px;
        
margin:0 auto;
    }

    
#navi ul li {
        
list-style:none;
        
display:block;
        
float:left;
        
width:auto;
        
background:url(img/border_nav.pngno-repeat right;
        
height:100px;
        
margin-top:0px;
    }
    
    
#navi ul li:last-child {
        
background:none !important;
    }
    
        
#navi ul li a {
            
line-height:96px;
            
margin:0 29px 0 29px;
            
font-size:14px;
            
color:#833931;
            
text-shadow:0px 0px 5px #000, 1px 1px 1px #000, 0px 0px 10px #000;
            
text-decoration:none;
            
text-transform:uppercase;
        }
        
        
#navi ul li a:hover {
            
color:#FF4C55;
            
text-shadow:0px 0px 5px #000, 1px 1px 1px #000, 0px 0px 10px #000;
        

12/16/2012 14:36 flickz.#2
Code:
#navi {
    background:url(img/navi.png) no-repeat top center;
    height:100px;
    margin:0 auto;
    text-align:center;
}
Versuchs mal so.
12/16/2012 14:45 Cxyz#3
Quote:
Originally Posted by flickz. View Post
Code:
#navi {
    background:url(img/navi.png) no-repeat top center;
    height:100px;
    margin:0 auto;
    text-align:center;
}
Versuchs mal so.
hat nicht geklappt :(
12/16/2012 16:28 Moritze#4
gib den
body {
text-align: left;
{
und in jeder div id musst du dan selber schauen wie du den text haben willst.
12/16/2012 16:56 NotEnoughForYou#5
Wieso hat das ul 1000px breite ? Gib navi eine feste breite und dem ul auch (aber nur soviel wie es braucht ) dann text-align:center und margin:0px auto;
12/16/2012 19:23 Cxyz#6
Das Bild ist 1000x100 groß
12/16/2012 19:31 NotEnoughForYou#7
ja das bild aber nicht deine Liste ...
12/16/2012 19:58 Cxyz#8
danke hat funktioniert