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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Three Columns Div question

    hello,

    I have a header. Right now, it is only a div wrapped in another div, and placed at the center of the screen using the css margin:0 auto.

    I want to make it into 3 divs. Left, Center (the header) and Right. The reason is that, there's a line at the header image that should run from the left side to the right side of the screen. Right now, there's only empty space at the left and the right side of the header image.

    The question is, how do i place the header (center div) to be centered? The header div has a fixed layout, it's always 900px width. I think the margin:0 auto won't work anymore. How should i set the width of the left and right divs?


    Thank you

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,672
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello thesti,
    This example of a simple 3-column layout is about as easy as it gets. You should be able to solve your problem with that.
    If you need more help, post some code or link us to the test site and we'll take another look.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    820
    Thanks
    10
    Thanked 78 Times in 76 Posts
    Additional fixed CSS layouts are available here with many 3-column examples:

    http://www.code-sucks.com/css%20layo...h-css-layouts/

    http://www.code-sucks.com/css%20layo...x-css-layouts/

    Free to use.
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

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