SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2008
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A question about sort ordering divs and layout

    Hello guys,
    I was just reading some blogs about sort ordering of divs and a question suddenly came to me...
    Let's suppose that I have a markup in which content comes before any navigation (some says it's due to accessibility reasons), and that I plan to use a 3-columns layout:
    Code:
    <div id="main-content">Blah...</div>
    <div id="left-nav">Blah...</div>
    <div id="right-nav">Blah...</div>
    Well, how can I reach, via CSS, the classic 3-columns layout "left-nav - main-content - right-nav"? Can this be done?

    Thanks

  2. #2
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The html is a little messier, but can be done as in one of Paul's examples.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,289
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    If the pages is a fixed width then thankfully the code is a lot simpler and you simply move the columns across to where they should be displayed with either relative positioning or margins.

    http://www.pmob.co.uk/temp/3col-content-first.htm


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
  •