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 9 of 9
  1. #1
    Regular Coder
    Join Date
    Mar 2009
    Posts
    107
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Having trouble with left and right column positioning

    Hey guys,
    im having a little trouble with a layout.
    i dont think ill have to do too much explaining here because im sure its something every one will have had trouble with in the past.
    i always avoid having 2 collums.
    because i have trouble with possitioning when i drop a line in one , heres an image to show what i mean


    now i could counter the other collum with line breaks but im using a php include on the left collum, to get the text, so theres only 1 page , this is the homepage.

    iframes are not an option but im stuck for any others.
    dose any one know if theres a way of setting the table to be either absoloute or counter line breaks?

    would appreaciate any help any one can provide.
    thanks allot.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello IamHe,
    Your just looking for a basic two column layout. Have a look at a couple more examples here - http://nopeople.com/design/CSS%20tips/index.html

    If none of those interest you, post your code or give us a link to your test site and we might be able to help fixing what you've started with.
    In the meantime, have a look at the links in my signature line. They can probably all help you.
    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
    Mar 2009
    Posts
    107
    Thanks
    15
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Excavator View Post
    Hello IamHe,
    Your just looking for a basic two column layout. Have a look at a couple more examples here - http://nopeople.com/design/CSS%20tips/index.html

    If none of those interest you, post your code or give us a link to your test site and we might be able to help fixing what you've started with.
    In the meantime, have a look at the links in my signature line. They can probably all help you.
    Hello Excavator, thanks for your response, here is an example of what my site is set out like...
    http://364-days-to-go.info/sample.html

    ive included the same table twice just to show the effect adding content has.
    i need the right collum to stay possitioned at the top.

    here is the code for the sample i put together.

    Code:
    <table width="870" border="0" cellspacing="0" cellpadding="0" bgcolor="#0000CC">
      <tr>
        <td width="21">&nbsp;</td>
        <td width="501"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#FF0000">CONTENT:</td>
          </tr>
          <tr>
            <td bgcolor="#99FF33">&nbsp;</td>
          </tr>
        </table></td>
        <td width="11">&nbsp;</td>
        <td width="318"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#FF0000">SITE:</td>
          </tr>
          <tr>
            <td bgcolor="#009999">&nbsp;</td>
          </tr>
        </table></td>
        <td width="19">&nbsp;</td>
      </tr>
    </table>
    thanks again for all your help . i do appreciate it.

  • #4
    New Coder
    Join Date
    May 2010
    Location
    Las Vegas, NV
    Posts
    13
    Thanks
    0
    Thanked 3 Times in 3 Posts
    You can change the alignment of a cell by add a little bit of CSS. In the code below, I used "vertical-align:top" to align the 2 columns.

    Code:
    <td width="318" style="vertical-align:top">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td bgcolor="#FF0000">SITE:</td>
          </tr>
          <tr>
            <td bgcolor="#009999">&nbsp;</td>
          </tr>
      </table>
    </td>
    Las Vegas Web Design and Development - Cone Code Development

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,851
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    here is the code for the sample i put together.
    Don't you know why using tables for layout is very bad?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #6
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Yes, what ab said.
    More about tables in my signature below.
    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

  • #7
    Regular Coder
    Join Date
    Mar 2009
    Posts
    107
    Thanks
    15
    Thanked 0 Times in 0 Posts
    hey guys,
    thanks for the reply's
    i tried vertical align top and it didn't work

    as for my layout being tables
    its sliced straight from photoshop and has lots of images etc....

    i usually tend to stick to programing and stay away from html css, but im trying to build my own site , ive never had a problem throwing a layout together, i do always use tables , but like i said im having issues with the collums.

    so fist of all , can a image layout be properly coded without tables?
    and will it cure my collum issues?


    im out right now but as soon as i get home ill read up on those links in your sig... i briefly read through the one posted last nigh but will read it again when i get in and ill comment back then.
    again thanks for the responses, and if someone could answer those 2 questions for me that would be great.

  • #8
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,851
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Take a look at http://www.bonrouge.com/2c-hf-fluid%28r%29.php, which is a good 2 column CSS based layout. (You may set a fixed width to the #wrap, if required)
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #9
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    so fist of all , can a image layout be properly coded without tables?
    Of course it can. I've written hundreds of webpages and I've never used a table in my life.

    and will it cure my collum issues?
    Yes.
    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


  •  

    Posting Permissions

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