style sheets left/right align simultaneously?

Discussion in 'HTML' started by Keith Wiley, Nov 7, 2003.

  1. Keith Wiley

    Keith Wiley Guest

    Say you want a layout where you have places aligned on the left and then a
    date on the same line aligned at the right:

    Colorado 2000 - present
    New York 1995 - 1999
    Rhode Island Aug 1993 - 1994

    etc.

    How would you do this?

    ________________________________________________________________________
    Keith Wiley
    http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley

    "Yet mark his perfect self-contentment, and hence learn his lesson,
    that to be self-contented is to be vile and ignorant, and that to
    aspire is better than to be blindly and impotently happy."
    -- Edwin A. Abbott, Flatland
    ________________________________________________________________________
    Keith Wiley, Nov 7, 2003
    #1
    1. Advertising

  2. Keith Wiley

    Brett Guest

    Here is one way to do what your asking (using css):

    <span style="text-align: left">left text</span><span style="position:
    absolute; right: 0;">right text</span>

    --
    Brett
    Provision Tech
    http://www.provisiontech.net

    "Keith Wiley" <> wrote in message
    news:p...
    > Say you want a layout where you have places aligned on the left and then a
    > date on the same line aligned at the right:
    >
    > Colorado 2000 - present
    > New York 1995 - 1999
    > Rhode Island Aug 1993 - 1994
    >
    > etc.
    >
    > How would you do this?
    >
    > ________________________________________________________________________
    > Keith Wiley
    > http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley
    >
    > "Yet mark his perfect self-contentment, and hence learn his lesson,
    > that to be self-contented is to be vile and ignorant, and that to
    > aspire is better than to be blindly and impotently happy."
    > -- Edwin A. Abbott, Flatland
    > ________________________________________________________________________
    Brett, Nov 7, 2003
    #2
    1. Advertising

  3. Keith Wiley

    Michel Guest

    nice.

    But.... what's the plus to using tables in this case?

    Michel

    "Brett" <> wrote in message
    news:...
    > Here is one way to do what your asking (using css):
    >
    > <span style="text-align: left">left text</span><span style="position:
    > absolute; right: 0;">right text</span>
    >
    > --
    > Brett
    > Provision Tech
    > http://www.provisiontech.net
    >
    > "Keith Wiley" <> wrote in message
    > news:p...
    > > Say you want a layout where you have places aligned on the left and then

    a
    > > date on the same line aligned at the right:
    > >
    > > Colorado 2000 - present
    > > New York 1995 - 1999
    > > Rhode Island Aug 1993 - 1994
    > >
    > > etc.
    > >
    > > How would you do this?
    > >
    > > ________________________________________________________________________
    > > Keith Wiley
    > > http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley
    > >
    > > "Yet mark his perfect self-contentment, and hence learn his lesson,
    > > that to be self-contented is to be vile and ignorant, and that to
    > > aspire is better than to be blindly and impotently happy."
    > > -- Edwin A. Abbott, Flatland
    > > ________________________________________________________________________

    >
    >
    Michel, Nov 7, 2003
    #3
  4. Keith Wiley

    Brett Guest

    There is no plus to using tables (other than, its what most of are used to).
    This can be accomplished using css which is always better for content
    layout.

    --
    Brett
    Provision Tech
    http://www.provisiontech.net

    "Michel" <> wrote in message
    news:boh7vn$bn$...
    > nice.
    >
    > But.... what's the plus to using tables in this case?
    >
    > Michel
    >
    > "Brett" <> wrote in message
    > news:...
    > > Here is one way to do what your asking (using css):
    > >
    > > <span style="text-align: left">left text</span><span style="position:
    > > absolute; right: 0;">right text</span>
    > >
    > > --
    > > Brett
    > > Provision Tech
    > > http://www.provisiontech.net
    > >
    > > "Keith Wiley" <> wrote in message
    > > news:p...
    > > > Say you want a layout where you have places aligned on the left and

    then
    > a
    > > > date on the same line aligned at the right:
    > > >
    > > > Colorado 2000 - present
    > > > New York 1995 - 1999
    > > > Rhode Island Aug 1993 - 1994
    > > >
    > > > etc.
    > > >
    > > > How would you do this?
    > > >
    > > >

    ________________________________________________________________________
    > > > Keith Wiley
    > > > http://www.unm.edu/~keithw

    http://www.mp3.com/KeithWiley
    > > >
    > > > "Yet mark his perfect self-contentment, and hence learn his lesson,
    > > > that to be self-contented is to be vile and ignorant, and that to
    > > > aspire is better than to be blindly and impotently happy."
    > > > -- Edwin A. Abbott,

    Flatland
    > > >

    ________________________________________________________________________
    > >
    > >

    >
    >
    Brett, Nov 7, 2003
    #4
  5. Keith Wiley

    Keith Wiley Guest

    I only recently discovered stylesheets. Until now, I was using tables for
    all kinds of layouts, and believe me, I've become a master. Check out
    just the front page of my website if you want a taste of the lengths I've
    gone to with tables. :) However, I was wondering much I could get with
    one or the other. In particular, I'm trying to layout my resume, and I
    thought it might be messy to mix stylesheets with tables. But perhaps
    that's the right way to do it.

    On Fri, 7 Nov 2003, Michel wrote:

    > nice.
    >
    > But.... what's the plus to using tables in this case?
    >
    > Michel
    >
    > "Brett" <> wrote in message
    > news:...
    > > Here is one way to do what your asking (using css):
    > >
    > > <span style="text-align: left">left text</span><span style="position:
    > > absolute; right: 0;">right text</span>
    > >
    > > --
    > > Brett
    > > Provision Tech
    > > http://www.provisiontech.net
    > >
    > > "Keith Wiley" <> wrote in message
    > > news:p...
    > > > Say you want a layout where you have places aligned on the left and then

    > a
    > > > date on the same line aligned at the right:
    > > >
    > > > Colorado 2000 - present
    > > > New York 1995 - 1999
    > > > Rhode Island Aug 1993 - 1994
    > > >
    > > > etc.
    > > >
    > > > How would you do this?
    > > >
    > > > ________________________________________________________________________
    > > > Keith Wiley
    > > > http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley
    > > >
    > > > "Yet mark his perfect self-contentment, and hence learn his lesson,
    > > > that to be self-contented is to be vile and ignorant, and that to
    > > > aspire is better than to be blindly and impotently happy."
    > > > -- Edwin A. Abbott, Flatland
    > > > ________________________________________________________________________

    > >
    > >

    >
    >
    >


    ________________________________________________________________________
    Keith Wiley
    http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley

    "Yet mark his perfect self-contentment, and hence learn his lesson,
    that to be self-contented is to be vile and ignorant, and that to
    aspire is better than to be blindly and impotently happy."
    -- Edwin A. Abbott, Flatland
    ________________________________________________________________________
    Keith Wiley, Nov 7, 2003
    #5
  6. Keith Wiley

    Sid Ismail Guest

    On Fri, 7 Nov 2003 14:42:12 -0700, Keith Wiley <> wrote:

    : Say you want a layout where you have places aligned on the left and then a
    : date on the same line aligned at the right:
    :
    : Colorado 2000 - present
    : New York 1995 - 1999
    : Rhode Island Aug 1993 - 1994

    Use tables, my man.

    Right-align the right TD.

    Sid
    Sid Ismail, Nov 7, 2003
    #6
  7. Keith Wiley

    Sid Ismail Guest

    On Fri, 7 Nov 2003 14:52:29 -0800, "Brett" <> wrote:

    : Here is one way to do what your asking (using css):
    :
    : <span style="text-align: left">left text</span><span style="position:
    : absolute; right: 0;">right text</span>


    Jeeezzzzzzzzzzz - learn tables, please.

    Sid
    Sid Ismail, Nov 7, 2003
    #7
  8. Keith Wiley

    Sid Ismail Guest

    On Fri, 7 Nov 2003 15:06:34 -0800, "Brett" <> wrote:

    : There is no plus to using tables (other than, its what most of are used to).


    This is a very relevant use of tables.

    Why drive a bicycle 100 km when you can take a car?

    Sid
    Sid Ismail, Nov 7, 2003
    #8
  9. Keith Wiley

    Brett Guest

    o.k...maybe we need clarification on which one is the car. You tell me
    which one is quicker to type.

    <table width="100%" border="1" cellpadding="0" cellspacing="0" summary="">
    <tr valign="top">
    <td valign="top" width="50%" align="left">left text</td><td valign="top"
    width="50%" align="right">right text</td>
    </tr>
    </table>

    or

    <span style="text-align: left">left text</span>
    <span style="position:absolute; right: 0;">right text</span>

    Now, if you still think a table is quicker...what if after designing this I
    decided I wanted "right text" to actually be on the left and I had created
    100 static pages. If I used tables I would have to go into every file and
    remove </td><td valign="top" width="50%" align="right"> and replace it with
    a space (that's a lot of work). If I had created the layout with css. I
    would just go into my one *.css file and remove the "position:absolute;
    right: 0;" and I'm done and I just saved myself quite a bit of work.
    --
    Brett
    Provision Tech
    http://www.provisiontech.net

    "Sid Ismail" <> wrote in message
    news:...
    > On Fri, 7 Nov 2003 15:06:34 -0800, "Brett" <> wrote:
    >
    > : There is no plus to using tables (other than, its what most of are used

    to).
    >
    >
    > This is a very relevant use of tables.
    >
    > Why drive a bicycle 100 km when you can take a car?
    >
    > Sid
    >
    >
    >
    Brett, Nov 7, 2003
    #9
  10. Keith Wiley

    Spartanicus Guest

    Brett wrote:

    ><span style="text-align: left">left text</span><span style="position:
    >absolute; right: 0;">right text</span>


    The first span is superfluous.

    --
    Spartanicus
    Spartanicus, Nov 8, 2003
    #10
  11. Keith Wiley

    Adrienne Guest

    Gazing into my crystal ball I observed Keith Wiley <>
    writing in news:p:

    > I only recently discovered stylesheets. Until now, I was using tables
    > for all kinds of layouts, and believe me, I've become a master. Check
    > out just the front page of my website if you want a taste of the
    > lengths I've gone to with tables. :) However, I was wondering much I
    > could get with one or the other. In particular, I'm trying to layout
    > my resume, and I thought it might be messy to mix stylesheets with
    > tables. But perhaps that's the right way to do it.
    >


    Your resume screams for CSS. You do not need tables for your resume,
    unless you are needing to use tabular data. You're using depreciated
    markup, you have elements that are not closed, no Document Type
    declaration, spacer gifs, etc. A resume on a black background also does
    not look that professional (in my opinion), and may cause a
    recruiter/employer that has tired eyes from looking at hundreds of resumes
    to not even read it.

    No only that, with CSS there is no need for a separate page just for
    printing. CSS allows you to use @media print to remove parts that do not
    need to be printed. If you want to see my resume (CSS only), have a look
    at http://www.arbpen.com/resume.php .

    --
    Adrienne Boswell
    Please respond to the group so others can share
    http://www.arbpen.com
    Adrienne, Nov 8, 2003
    #11
  12. Quoth the raven named Adrienne:

    > No only that, with CSS there is no need for a separate page just for
    > printing. CSS allows you to use @media print to remove parts that do not
    > need to be printed. If you want to see my resume (CSS only), have a look
    > at http://www.arbpen.com/resume.php .


    Very nice page, Adrienne. The whole site is quite good.

    The @media print does allow the icons and stuff at the bottom of the
    resume. Was that intentional?

    --
    -bts
    -This space intentionally left blank.
    Beauregard T. Shagnasty, Nov 8, 2003
    #12
  13. Keith Wiley

    Adrienne Guest

    Gazing into my crystal ball I observed "Beauregard T. Shagnasty"
    <> writing in
    news:p_Xqb.71108$:

    > Quoth the raven named Adrienne:
    >
    >> No only that, with CSS there is no need for a separate page just for
    >> printing. CSS allows you to use @media print to remove parts that do
    >> not need to be printed. If you want to see my resume (CSS only), have
    >> a look at http://www.arbpen.com/resume.php .

    >
    > Very nice page, Adrienne. The whole site is quite good.


    <blush>Thank you, I try.</blush>

    >
    > The @media print does allow the icons and stuff at the bottom of the
    > resume. Was that intentional?
    >


    Yeah, that's a mystery to me. On local host, I don't see them, but when
    it's uploaded to the server, I do.

    --
    Adrienne Boswell
    Please respond to the group so others can share
    http://www.arbpen.com
    Adrienne, Nov 8, 2003
    #13
  14. Keith Wiley

    Sid Ismail Guest

    On Fri, 7 Nov 2003 15:32:15 -0800, "Brett" <> wrote:

    : <span style="position:absolute; right: 0;">right text</span>


    Not all browsers like this, but ALL browsers accommodate tables poifectly.

    Sid
    Sid Ismail, Nov 8, 2003
    #14
  15. Keith Wiley

    Michel Guest

    yep

    "Sid Ismail" <> wrote in message
    news:...
    > On Fri, 7 Nov 2003 15:32:15 -0800, "Brett" <> wrote:
    >
    > : <span style="position:absolute; right: 0;">right text</span>
    >
    >
    > Not all browsers like this, but ALL browsers accommodate tables poifectly.
    >
    > Sid
    >
    Michel, Nov 8, 2003
    #15
  16. Toby A Inkster, Nov 8, 2003
    #16
  17. While the city slept, Brett <> feverishly typed:

    > o.k...maybe we need clarification on which one is the car. You tell
    > me which one is quicker to type.


    The example presented by the OP suggests tabular data, so a table would
    probably be the best place to put it. By all means use style sheets to align
    the data within the table. Tables are not all bad. They are perfect for
    presenting tabular data - that is what they were designed for. It is
    designers using them for layout that has given them a bad name.

    BTW, the posting convention in this group is to place your replies below the
    text you are replying to, and to snip any other irrelevant text.

    Cheers,
    Nige

    --
    Nigel Moss.

    Email address is not valid. . Take the dog out!
    http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
    In the land of the blind, the one-eyed man is very, very busy!
    nice.guy.nige, Nov 8, 2003
    #17
  18. "Brett" <> wrote:

    > o.k...maybe we need clarification on which one is the car.


    You need to learn how to post to Usenet before you have chances of being
    taken seriously. Thus, please consult the basic netiquette if and only if
    you have something useful or funny to say. Some hints:
    http://www.cs.tut.fi/~jkorpela/usenet/

    > You tell me which one is quicker to type.


    Why would that matter?

    > <table width="100%" border="1" cellpadding="0" cellspacing="0"
    > summary="">
    > <tr valign="top">
    > <td valign="top" width="50%" align="left">left text</td><td
    > valign="top"
    > width="50%" align="right">right text</td>
    > </tr>
    > </table>


    Well, you need to understand tables before you can use them properly.
    You are using superfluous and even harmful attributes and not using some
    useful attributes, and you have missed the point that tables are for
    describing the structure of tabular data, not for specifying a particular
    visual formatting for it - that's what CSS is for (though we might accept
    some presentational attributes as interim workarounds, if you ask nicely).

    > or
    >
    > <span style="text-align: left">left text</span>
    > <span style="position:absolute; right: 0;">right text</span>


    This is much faster to write and has exactly the same semantics as you span
    stuff:
    left text right text

    > Now, if you still think a table is quicker...what if after designing
    > this I decided I wanted "right text" to actually be on the left and I
    > had created 100 static pages.


    If you decide to change the structure of the page, then the markup should be
    changed accordingly.

    If you really regard the order of columns as presentational only (I don't),
    then you could play with the direction property.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Nov 8, 2003
    #18
  19. Keith Wiley

    Brett Guest

    > > Not all browsers like this, but ALL browsers accommodate tables
    poifectly.

    Why don't you back this up with some examples?

    I have tested <span style="position:absolute; right: 0;">right text</span>
    on the following browsers:

    Windows
    -------------
    Mozilla 1.4
    Firebird 0.6.1
    Opera 7.21
    IE 6
    netscape 4.8

    Mac
    -------------
    Safari 1.0
    IE 5
    IE 5.2

    Linux
    -------------
    galeon 1.3
    mozilla 1.3
    konqueror 3.1

    Out of all these browsers only one had any difficulty and that was netscape
    4.8. I think, Netscape 4 is about 5 years old now and the few that are using
    it should really upgrade. But if you decide you really want to fully
    support netscape 4 you'll have to forget css for content layout and stick
    with tables.

    Also above you mentioned "browsers" as in plural. What other browser are you
    thinking of? or did you even test this out?

    --
    Brett
    Provision Tech
    http://www.provisiontech.net
    Brett, Nov 8, 2003
    #19
  20. Keith Wiley

    Keith Wiley Guest

    On Sat, 8 Nov 2003, Adrienne wrote:

    > Your resume screams for CSS. You do not need tables for your resume,
    > unless you are needing to use tabular data. You're using depreciated
    > markup, you have elements that are not closed, no Document Type
    > declaration, spacer gifs, etc. A resume on a black background also does
    > not look that professional (in my opinion), and may cause a
    > recruiter/employer that has tired eyes from looking at hundreds of resumes
    > to not even read it.


    Actually, what you were looking at is rather old. You seem to have missed
    the point of my main question, being that I am in the process of
    redesigning my entire site with clean closed tags, dark text on light
    background, all the other stuff you just recommended as if you think I
    just thought of it for the first time. I wasn't asking for a critique of
    my old resume, I was asking syntax questions of how to layout my new
    resume. Wasn't I fairly clear about that?

    Thanks for the pointers anyway, but none of them really answer my question
    now do they? Not too helpful.

    ________________________________________________________________________
    Keith Wiley
    http://www.unm.edu/~keithw http://www.mp3.com/KeithWiley

    "Yet mark his perfect self-contentment, and hence learn his lesson,
    that to be self-contented is to be vile and ignorant, and that to
    aspire is better than to be blindly and impotently happy."
    -- Edwin A. Abbott, Flatland
    ________________________________________________________________________
    Keith Wiley, Nov 8, 2003
    #20
    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. Kay
    Replies:
    2
    Views:
    7,148
  2. John Salerno

    left and right align on the same line

    John Salerno, Feb 11, 2006, in forum: HTML
    Replies:
    10
    Views:
    11,901
    Jonathan N. Little
    Feb 13, 2006
  3. Paul Lautman

    left align within centre align

    Paul Lautman, Mar 3, 2006, in forum: HTML
    Replies:
    3
    Views:
    573
    Paul Lautman
    Mar 3, 2006
  4. =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=

    Help on table align on left of page vs left hanging indent

    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=, Jul 10, 2007, in forum: XML
    Replies:
    2
    Views:
    999
    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=
    Jul 16, 2007
  5. Oran
    Replies:
    2
    Views:
    536
Loading...

Share This Page