Can CSS do this?

Discussion in 'HTML' started by yesthatmcgurk@gmail.com, Apr 12, 2006.

  1. Guest

    Can someone show me the equivalent in CSS, and explain how it is better
    (not meaning to sound trollish; just interested):

    <table id="iCantDoThisEasilyWithCSS" width=100% height=100%>
    <tr>
    <td width=50% align=left>Stuff all kinds of neat junk in here,
    like controls and such</td>
    <td width=auto align=right>More stuff, crammed over on the
    right hand side</td>
    </tr>
    </table>

    This works in all browsers and can be nested inside of div's and other
    tables without wierdness happening. I tried to do this with a floating
    div, but the damn thing wouldn't work like I expected (
    , Apr 12, 2006
    #1
    1. Advertising

  2. wrote:
    > Can someone show me the equivalent in CSS, and explain how it is better
    > (not meaning to sound trollish; just interested):
    >
    > <table id="iCantDoThisEasilyWithCSS" width=100% height=100%>
    > <tr>
    > <td width=50% align=left>Stuff all kinds of neat junk in here,
    > like controls and such</td>
    > <td width=auto align=right>More stuff, crammed over on the
    > right hand side</td>
    > </tr>
    > </table>
    >
    > This works in all browsers and can be nested inside of div's and other
    > tables without wierdness happening. I tried to do this with a floating
    > div, but the damn thing wouldn't work like I expected (


    Post your code minus the content.
    Mike Scirocco, Apr 12, 2006
    #2
    1. Advertising

  3. Guest

    ? This is what I'm looking for an equivalent in CSS for. I've got
    about ten aborted attempts in CSS, none of which behaved well. I wiped
    it all out and went back to the table layout because I can't spend more
    time on it...

    <table width=100% height=100%>
    <tr>
    <td width=50% align=left></td>
    <td width=auto align=right></td>
    </tr>
    </table>
    , Apr 13, 2006
    #3
  4. dorayme Guest

    In article
    <>,
    wrote:

    > Can someone show me the equivalent in CSS, and explain how it is better
    > (not meaning to sound trollish; just interested):
    >
    > <table id="iCantDoThisEasilyWithCSS" width=100% height=100%>
    > <tr>
    > <td width=50% align=left>Stuff all kinds of neat junk in here,
    > like controls and such</td>
    > <td width=auto align=right>More stuff, crammed over on the
    > right hand side</td>
    > </tr>
    > </table>
    >
    > This works in all browsers and can be nested inside of div's and other
    > tables without wierdness happening. I tried to do this with a floating
    > div, but the damn thing wouldn't work like I expected (


    What is the id for?

    Anyway, no, you won't be able to do this without weirdness
    happening for you as you adapt any suggestion in css to your
    needs. CSS is essentially weird and you will need to delve into
    the black magic to control it and make it produce reasonable
    effects in most browsers. A magician could teach you to mimic
    just one part of his act but when the curtain goes up and the
    lights beam down on you, you need more to steady your trembling
    knees.

    Why not start with a very readable

    http://www.w3.org/MarkUp/Guide/Style

    and/or

    http://www.htmldog.com/guides/htmlbeginner/

    --
    dorayme
    dorayme, Apr 13, 2006
    #4
  5. Toby Inkster Guest

    yesthatmcgurk wrote:

    > <table width=100% height=100%>
    > <tr>
    > <td width=50% align=left></td>
    > <td width=auto align=right></td>
    > </tr>
    > </table>


    <div class=c-wrapper>
    <div class=c-right>Content here</div>
    <div class=c-left>Navigation here</div>
    <br class=c-clear>
    </div>

    DIV.c-wrapper {
    position: relative;
    }

    DIV.c-wrapper DIV.c-right {
    width: 65%;
    float: right;
    margin-right: 2%;
    }

    DIV.c-wrapper DIV.c-left {
    width: 30%;
    float: right;
    margin-right: 1%;
    }

    DIV.c-wrapper BR.c-clear {
    clear: right;
    }

    e.g.
    http://examples.tobyinkster.co.uk/2col

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me ~ http://tobyinkster.co.uk/contact
    Toby Inkster, Apr 14, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    4
    Views:
    690
    clintonG
    Dec 24, 2004
  2. tom watson

    print.css and screen.css

    tom watson, Sep 9, 2003, in forum: HTML
    Replies:
    1
    Views:
    448
    Jukka K. Korpela
    Sep 9, 2003
  3. Joshua Beall
    Replies:
    1
    Views:
    401
    Bertilo Wennergren
    Dec 10, 2003
  4. Noozer
    Replies:
    10
    Views:
    2,021
    Mitja
    Oct 13, 2004
  5. Replies:
    6
    Views:
    530
    Jonathan N. Little
    Mar 18, 2006
Loading...

Share This Page