Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Urgent help needed css align center...

    Hey

    I know you've all ran here thinking its a simple... margin: 0px auto; job... but its not I'm afraid.

    Take a look at http://www.lab15.co.uk/newweb

    I want the Navigation menu to be central (I'm trying to achieve the look of the www.etnies.com heading.)

    CSS can be found by using: http://www.lab15.co.uk/newweb/css/main.css

    Any and all help is appreciated mucho! I'm very stuck on this one, no matter what I do it won't centralise!!!!!!!!!!!!!

  • #2
    Regular Coder
    Join Date
    Feb 2009
    Posts
    101
    Thanks
    7
    Thanked 0 Times in 0 Posts
    by the way, you should validate your code...especially as you don't even have a doc type in there aswell

    http://validator.w3.org/check?uri=ht...Inline&group=0

  • #3
    New to the CF scene
    Join Date
    Oct 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cheers, I shall do that now.

    I hadn't got round to that because this issue is stressing me out... any tips or pointers on how to fix it?

  • #4
    Regular Coder
    Join Date
    Feb 2009
    Posts
    101
    Thanks
    7
    Thanked 0 Times in 0 Posts
    also, not sure if it'd make any difference, but i noticed:

    Code:
    #wrapper {
    	width: 100%;
    	height: 106px;
    		background-image: url(../images/index_08.png);
    	margin: 0px Auto;
    }
    
    #header {
    	margin: 0px Auto;
    	width: 700px;
    	background-image: url(../images/index_08.png);
    	height:106px;
    }
    Your margin: 'auto' is spelt Auto and should be auto....


    Oh and also try using
    Code:
    text-align: center
    to sort your navigation

  • #5
    Regular Coder
    Join Date
    Feb 2009
    Posts
    101
    Thanks
    7
    Thanked 0 Times in 0 Posts
    also noticed you haven't used any resets in your CSS, I advise doing so otherwise your gonna have difficulties later on with cross browser consistencies. I import :
    Code:
    @import url('reset.css');
    This reset.css into my main css:
    Code:
    html, body, div, span, applet, object, iframe,  
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,  
    a, abbr, acronym, address, big, cite, code,  
    del, dfn, em, font, img, ins, kbd, q, s, samp,  
    small, strike, strong, sub, sup, tt, var,  
    b, u, i, center,  
    dl, dt, dd, ol, ul, li,  
    fieldset, form, label, legend,  
    table, caption, tbody, tfoot, thead, tr, th, td {  
        margin: 0;  
        padding: 0;  
        border: 0;  
        outline: 0;  
        font-size: 100%;  
        vertical-align: baseline;  
        background: transparent;  
    }  
    body {  
        line-height: 1;  
    }  
    ol, ul {  
        list-style: none;  
    }  
    blockquote, q {  
        quotes: none;  
    }  
    blockquote:before, blockquote:after,  
    q:before, q:after {  
        content: '';  
    }  
      
    /* remember to define focus styles! */  
    :focus {  
        outline: 0;  
    }  
      
    /* tables still need 'cellspacing="0"' in the markup */  
    table {  
        border-collapse: collapse;  
        border-spacing: 0;  
    }

    will hopefully save you some heartache later


  •  

    Tags for this Thread

    Posting Permissions

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