Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

XHTML Columns - Content Floating

  • 17-12-2009 11:54PM
    #1
    Closed Accounts Posts: 20


    Hi, Having a problem with a web-page design (i'm a newbie at this so this is probably very straightforward but I can't seem to get it working)

    I have a table with two columns and in the left hand column I'm using divs to put in short blocks of formatted text (div id for a block of text with div classes to format the headings of the text etc.) This is working fine as the first block of text is at the top of the table and subsequent divs are directly underneath that, all the way down the column.

    However, when I try to do the same thing with the right hand column the first div ends up half-way down the page instead of starting up at the top, and I can't figure out why!

    The CSS I'm using is as follows:

    Div ID for left-hand column divs:

    #news{
    position:relative;
    float:left;
    width: 500px;
    left:10px;
    padding: 10px;
    }

    Div ID for right-hand column divs:
    #links {
    position:relative;
    float:right;
    width: 300px;
    right:10px;
    padding: 10px;
    }


    There's obviously LOADS more code than than but I'm not sure how much to put up here would be useful? Any help would be greatly appreciated as I've been working on this for hours and getting nowhere.

    Thanks!!!


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Moved from Development.


  • Registered Users, Registered Users 2 Posts: 2,119 ✭✭✭p


    Maybe you could just try something like:
    margin-top: 300px;


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    set the table tds to valign="top", pretty sure that'll work.


  • Closed Accounts Posts: 20 spaniel


    Perfect I can't believe this didn't occur to me, thanks a million!!!


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    spaniel wrote: »
    Perfect I can't believe this didn't occur to me, thanks a million!!!

    No problem, glad it worked :)


  • Advertisement
Advertisement