SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    3-column problem

    I've been trying first time with 3-column layout and have been trying to break down my problems by going back to beginning. Now, I can't get my right column to stay at the top, it starts wherever the center column finishes. Could someone look at it here?
    thanks

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

    Floated content must come before (in the html) the static content you want it to align alongside.

    Change your html to this and it will work
    Code:
    <div id="left">
    Left content
    </div>
    <div id="right">
    Right content
    </div>
    <div id="center">
    center content<br>
    center content
    </div>
    Edit:


    Ignore that comment above I just noticced you were using absolute positioning. You don't need to change the order of the html you just have to set the top position on the absolute element otherwise it will assume its top position is at its currecnt position in the html.

    Code:
    #right { 
    position: absolute;
    right:10px;
    width:200px;
    background:#ccdff2;
    border:1px dotted;
    top:0;
    }

  3. #3
    SitePoint Member
    Join Date
    May 2005
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank You!


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
  •