style sheets left/right align simultaneously?

K

Keith Wiley

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.

Well, I tried the table recommendation made by someone at the to of this
thread, but the table doesn't position itself properly in the context of
the rest of the resume which, so far, is css positioned <P> tags for the
most part, with a few <H3> tags. The table doesn't flow down the page the
way the <P> items do. It's printed on top of them. I tried setting
position to relative, but it doesn't make any difference, the position
isn't, in fact, relative with relation to the rest of the block items that
are relatively flowing down the page.

I guess it isn't possible to mix tables with css because they print on top
of each other, so if I use a table for one small portion of the resume
which is in list format with right alignments, I am then forced to discard
css for the entire resume layout and use a table for the whole darn thing,
right? I mean, sure, I can use css to personalize the look of the table,
but I can't use css for the layout of the page if the page has a table on
it. Am I wrong? I'm using Netscape 7, so I'm guessing it's as up to date
as they come.

________________________________________________________________________
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

Why would that matter?

I personally like to produce pages as quick as possible and if I can
accomplish the same thing with less typing that helps. This example may not
be a very big difference but it wasn't that long ago I was nesting lots of
tables inside each other to accomplish the layout desired. Now, with css, I
can produce the same layout with about have the code. I also have the
flexibility to easily move content around with css. Many times with nested
tables you basically have to start from scratch to move content around.

Basically css is a big time saver!
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,

Maybe you should be more specific. I have used tables for a long time and
have had them looking great on many different OS's and browsers while
validating.
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).

I was suggesting css?
If you decide to change the structure of the page, then the markup should be
changed accordingly.

why? If css is used you could change it very quickly for every file that
referenced it. Again, if you have one hundred static pages...it would take
a lot longer to go through every file and modify the markup.
 
B

Brett

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.

I completely agree to use tables for tabular data. I basically read through
the first question to quick and was picturing just one line of text and
figured css would be a good solution.

Although now that you bring it up why not use css for tablular layout....

<span style="position: absolute; text-align: left; top: 100px;">
line1<br>
line2<br>
line3<br>
</span>
<span style="position:absolute; right: 0; top: 100px;">
line1<br>
line2<br>
line3<br>
</span>

sure you can't use borders and things around each item but what if you
didn't want to anyway? Although I guess you could if you wrapped each line
with a tag that had a border on it. Really its no different than using <td>
around each item. Maybe its just the fact that tables are for this and even
though you can accomplish the same thing with css you should stick to using
the correct tags. But, then again if you ever thought you might move the
"right text" to a different position on the screen, maybe css should be
used?
 
A

Adrienne

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?

<quote>
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.
</quote>

Since you did not provide a URL, I looked at the old resume. Forgive me.
Thanks for the pointers anyway, but none of them really answer my
question now do they? Not too helpful.

As others have said, if you have tabular data, then use tables. If you do
not, then use the correct markup. I gave you the URL to my resume so you
could look at the markup as a reference.
 
J

Jukka K. Korpela

Brett said:
I personally like to produce pages as quick as possible and if I can
accomplish the same thing with less typing that helps.

You are not accomplishing the same thing. Try using a non-CSS browser and
you will see what I mean.
it wasn't that long ago I was nesting
lots of tables inside each other to accomplish the layout desired.
Now, with css, I can produce the same layout with about have the code.

That's fine. Your past abuse of tables does not, however, mean that tables
should not be used when you actually have tabular data.
Maybe you should be more specific. I have used tables for a long time
and have had them looking great on many different OS's and browsers
while validating.

But apparently you don't understand what tables are meant for. You only have
experience with using them for something that they were not meant for, it
seems.
I was suggesting css?


why? If css is used you could change it very quickly for every file that
referenced it.

By changing it, namely CSS, you would only change one suggested rendering of
the page.
Again, if you have one hundred static pages...it would
take a lot longer to go through every file and modify the markup.

If hundreds of static pages that may need structural revision are you
problem, maybe you should find better authoring tools, like preprocessors,
or maybe SSI. But regarding things like the order of columns in tables in a
hundred pages, it is generally best to decide on it and stick to it. Better
to think and test in advance than to change the structure (or at least the
appearance) in a way that makes the tables look different to users.
Reordering table columns on Web pages isn't really comparable to normal
tuning of visual appearance.
 
K

Keith Wiley

As others have said, if you have tabular data, then use tables. If you do
not, then use the correct markup. I gave you the URL to my resume so you
could look at the markup as a reference.

So, one thing I'm wondering is whether it is possible (or even advisable)
to mix css layout with table layout, because it seems hard to get the two
to line up together. If one small piece of a layout requires a table
(such as for the left-aligned second column in my original example) does
that mean that the entire page must then be laid out as a table?

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

Adrienne

So, one thing I'm wondering is whether it is possible (or even
advisable) to mix css layout with table layout, because it seems hard
to get the two to line up together. If one small piece of a layout
requires a table (such as for the left-aligned second column in my
original example) does that mean that the entire page must then be laid
out as a table?

No, use table markup where it is appropriate. For example:

<div id="menu"> <!-- styled appropriately -->
<ul>
<li>menu item</li>
</ul>
</div>
<div id="content"> <!-- styled appropriately -->
<h1>ACME Widget Company Products</h1>
<table id="products" summary="Product List">
<caption>Product List</caption>
<thead>
<tr>
<th>Part #</th><th>Price</th>
</tr>
</thead>
<tbody>
<tr class="twhite">
<td>12345</td><td>1.00</td>
</tr>
<tr class="tgreen">
<td>67890</td><td>5.00</td>
</tr>
</tbody>
</table>
</div>
<div id="footer">
Page Footer
</div>

In the above example, each element can be styled. For example, the menu
could have a border around it, and the table could be styled like greenbar
paper, with perhaps a different font. The sky's the limit.
 
T

Toby A Inkster

Keith said:
So, one thing I'm wondering is whether it is possible (or even advisable)
to mix css layout with table layout

Yes it is possible.

It is never *advisable* to mix table based layouts and CSS layouts simply
because it is never advisable to use tables for layouts at all.

If you follow the URL in my .signature, you will find a page that uses
CSS for layout, but uses a table for marking up... well... a table.
 

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
474,091
Messages
2,570,605
Members
47,225
Latest member
DarrinWhit

Latest Threads

Top