Changing table appearance with CSS

C

Charles Banas

I've seen something like this done before:

A set of tabular data is laid out logically in a table. One item for
each row in the table.

Then, the table is reorganized with CSS so that each row takes on an
entirely different appearance. (As far as I know, it didn't involve any
JavaScript or HTML hacks to do the job - just a simple table.)

On my own project, I've got a table containing news items. The data is
laid out in a tabular fashion with 4 columns: Subject, Date, Poster, Text.

What I want to do is change the layout from a simple row to a simple box
that contains the data in a more visually pleasing arrangement.

For example:

(news)_________________________
NEWS SUBJECT
4/4/04 | Charles
News body text etc., etc.
-------------------------

Where the item is tabulated as:

<table>
<tr>
<td>news subject</td>
<td>4/4/04</td>
<td>Charles</td>
<td>News body text etc., etc.</td>
</tr>
</table>

As far as I've gotten is floating the subject, date, and poster to the
side of the news box, and the body flows around it (poorly). I know I'm
on the right track, I just need a kick in the pants to get moving. I
also need help with setting up outlines and borders in the right places
(such as between the date and poster).

Again, I've seen it done once before, so I know it's possible.

Can I get some help here?

I've googled around for hours looking for the site I stumbled on that
demonstrated something along these lines, but found nothing. It seems
to have been the only site that even referenced an idea like this. I've
also asked elsewhere, but am still awaiting a response. I feel like I'm
being ignored.

(As a side note, the rest of the site is done entirely with <div>s and
CSS layout techniques, but I want to use a table for the purpose it was
created for - tabulated data.)
 
C

Charles Banas

Mark said:
Maybe. It might have been a bad dream.

I was quite awake. My pulse was also about 86, as I recall.
*Gasp*! No! Unheard of. ;-)

Really! And here I thought it was common knowledge!

</sarcasm>

That's exactly it! Though, I thought the clear property was ignored
without an accompanying float property? Boy, I *must* be sleeping.

Thanks for the help!

As an aside, are you aware of a site that demonstrates this?
Particularly, I recall the page was prefixed with a breif treatise: "I
learned that tables were not to be used for layout, but for tabulated
ata instead. So I researched ways to use tables in different ways." Or
something.

Then he showed a table with a list of Opera skins, followed by the same
table styled similar to wat you've just shown me.

I'm aching to find that site again, as it probably has more ideas I
missed and want to learn from.

Anyway, thanks again!
 
C

Charles Banas

Charles said:
That's exactly it! Though, I thought the clear property was ignored
without an accompanying float property? Boy, I *must* be sleeping.
We have confirmation. I *AM* sleeping. I completely missed the
inheritance. Ignore that part.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top