total ........................... $100.00

W

WindAndWaves

Hi Gurus

What is the smartest way to make

item x ....................... $100.00
item y ............................$2.00
total ...........................$102.00

using cascading stylesheets

TIA

- Nicolaas
 
N

Nik Coughlin

WindAndWaves said:
Hi Gurus

What is the smartest way to make

item x ....................... $100.00
item y ............................$2.00
total ...........................$102.00

using cascading stylesheets

TIA

- Nicolaas

With a table. It's tabular data.

<style type="text/css">
.price
{
text-align: right;
}
</style>

<table>
<tr>
<td>item x</td>
<td class="price">$100.00</td>
</tr>
<tr>
<td>item y</td>
<td class="price">$2.00</td>
</tr>
<tr>
<td>total</td>
<td class="price">$102.00</td>
</tr>
</table>
 
L

Lauri Raittila

Hi Gurus

What is the smartest way to make

item x ....................... $100.00
item y ............................$2.00
total ...........................$102.00

using cascading stylesheets

IMHO, dotted tabs are not very good idea in net, they look so 1980's, so
unless you aim 1980 look, think something else.

Here is couple ways to do it:
http://www.student.oulu.fi/~laurirai/www/css/examples/dottedtab.html
http://www.student.oulu.fi/~laurirai/www/css/examples/dottedtab2.html
 
K

Kris

What is the smartest way to make

item x ....................... $100.00
item y ............................$2.00
total ...........................$102.00

using cascading stylesheets

IMHO, dotted tabs are not very good idea in net, they look so 1980's, so
unless you aim 1980 look, think something else.[/QUOTE]

I'd go for a table.

<table>
<tr>
<th><span>item x</span></th>
<td><span>$100.00</span></td>
</tr>
...
</table>

table { width: 100%; }

td, th {
color: #000;
background: url("dots.png") #fff bottom left repeat-x;
}

td { text-align: left; }
th { text-align: right; }

tr span {
color: #000;
background: #fff;
}
 
L

Lauri Raittila

IMHO, dotted tabs are not very good idea in net, they look so 1980's, so
unless you aim 1980 look, think something else.

I'd go for a table.[/QUOTE]

I assumed table. But now that I think of it, it could be done using pre
also, but I don't think that is good idea at all.

[snip]
background: url("dots.png") #fff bottom left repeat-x;
[snip]

This might degrade bit better than my examples, but you need that image.

I can't think any sensible way to make the dots look like real dots of
font, which is disappointing. Unsensible way, works in Opera 7 at least:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<style type="text/css">
tr, table {display:block;font-family:monospace;}
td {display:inline;white-space:pre:font-family:monospace;}
tr td:first-child:after { content:" ......................." }
tr + tr td:first-child:after { content:" ........................."}
tr + tr + tr td:first-child:after { content:" ........................"}
</style>

<table>
<tr><td>item x<td>$100.00
<tr><td>item y<td>$2.00
<tr><td>total<td>$102.00
</table>
 
N

neredbojias

Without quill or qualm, Lauri Raittila quothed:
I assumed table. But now that I think of it, it could be done using pre
also, but I don't think that is good idea at all.

Why not? Pre is exactly the way I'd do it if I really wanted to spots
before my eyes.
 
L

Lauri Raittila

Without quill or qualm, Lauri Raittila quothed:


Why not? Pre is exactly the way I'd do it if I really wanted to spots
before my eyes.

Because those dots aren't data, but presentation. I would not like to
copy such table to somewhere, I cans sort it using normal tools etc.
 
N

neredbojias

Without quill or qualm, Lauri Raittila quothed:

Because those dots aren't data, but presentation. I would not like to
copy such table to somewhere, I cans sort it using normal tools etc.

Okay.
 

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,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top