SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist
    Join Date
    Dec 2004
    Posts
    419
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    css column query

    Hi,

    I am currently messing about with a new design for my currently table based site.

    I have a layout I like here:

    http://www.jimpix.co.uk/rejig/005.htm

    My question is whether there is a way to divide the main content into two columns, with maybe a 70% split to the left, and a 30% split to the right.

    By 'main content' I mean the main body of the text with the 'heading#1' and 'heading#2' - I want to keep the header and footer spanning the whole width. It's just the content I wanted to divide. Or at least, to have the option to, with maybe two different <div> tags:

    <div id="left">heading one...</div>
    <div id="right">heading two...</div>

    But then to have another div which I could use instead, if I wanted a full width div instead of columns, for other pages, e.g.

    <div id="main">heading one and heading two...</div>

    I know this is probably a really silly question, but I've had a look on lots of template sites, and have tried to figure out how I could possibly do it, but I'm stuck.

    Thank you

    Jim

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,526
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    HI,

    I'm not quite sure if I understand as it seems you simply want two elements side by side. If so you can just float them side by side with appropriate widths (just leave some leeway e,g, 29.9% and 70% for rounding errors).

    Then following elements just need clear:both applied and they will start underneath both columns.


Bookmarks

Posting Permissions

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