style sheets left/right align simultaneously?

K

Keith Wiley

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 (e-mail address removed)
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
________________________________________________________________________
 
B

Brett

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>
 
B

Brett

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.
 
K

Keith Wiley

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.

nice.

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

Michel

________________________________________________________________________
Keith Wiley (e-mail address removed)
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
________________________________________________________________________
 
S

Sid Ismail

: 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
 
S

Sid Ismail

: 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
 
S

Sid Ismail

: 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
 
B

Brett

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.
 
S

Spartanicus

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

The first span is superfluous.
 
A

Adrienne

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 .
 
B

Beauregard T. Shagnasty

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?
 
A

Adrienne

Quoth the raven named Adrienne:


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?

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.
 
S

Sid Ismail

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


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

Sid
 
N

nice.guy.nige

While the city slept said:
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. (e-mail address removed). 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!
 
J

Jukka K. Korpela

Brett said:
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.
 
B

Brett

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?
 
K

Keith Wiley

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 (e-mail address removed)
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
________________________________________________________________________
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,010
Latest member
MerrillEic

Latest Threads

Top