Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Wordpress - CSS Layout Query

Options

Comments

  • Moderators, Technology & Internet Moderators Posts: 11,010 Mod ✭✭✭✭yoyo


    Wrap a new div around the content page.php such as:
    <div id="content">All the content fetching scripts...</div>
    
    (if you use posts do the same in archive.php)
    Then make a new CSS entry:
    #content{
       margin: 0 20px 0 20px; /* 20px margin L&R */
    }
    

    Hope this helps

    Nick

    Edit: Why do you have two container divs? only have one, maybe called the one with the content content instead


  • Registered Users Posts: 15 koaj


    YoYo,
    Many thanks for the quick & detailed response. I must admit that I didn't design the website, but am trying to make some changes to it. I will look into the 2 container divs and try your suggestions.

    Many thanks.


  • Moderators, Technology & Internet Moderators Posts: 11,010 Mod ✭✭✭✭yoyo


    koaj wrote: »
    YoYo,
    Many thanks for the quick & detailed response. I must admit that I didn't design the website, but am trying to make some changes to it. I will look into the 2 container divs and try your suggestions.

    Many thanks.

    Try not to have multiple divs with the same name if you can. I should have pointed out it is not actually incorrect coding but it is certainly bad practice. Also loose the Flash header design for something JavaScript based. That is one thing your Apple Mobile visitors (and newer Android machines) won't see alone. A pretty standard CSS structure would be:
    |Container
    -| Navbar
    -| Content
    -| Footer

    Of course this is quite broad, and you will likely have other divs, widget area, breadcrumbs etc. but it shows your container should contain all other divs inside of it. Calling everything the same name just makes trying to work out the actual container from other wrappers and what not a right pita..
    My suggestion should work anyways.
    The reason I said to make a new "content wrapper" layer for the content is that if you margin the div the main container is in, all the items (menu, header image) inside that div will get margined also, negating the purpose if that makes sense.

    Nick


Advertisement