CSS Template: help!

B

Bura Tino

OK, so I've decided to sign on to this CSS revolution - ang get rid of
all my tables. But I can't make things work.

For starters, suppose I want to create a template that has three
properties.

1. Is centered when printed.
2. Is 200px from the left when displayed.
3. Has a border around it.

The problem with 1. is that there appears to be no css way to center a
div.

The problem with 3 is that if I place positioned div's inside my div,
it doesn't know to draw a border around the whole thing.

Any suggestions?

Bura
 
S

Sreve R.

Bura Tino wrote in message ...
OK, so I've decided to sign on to this CSS revolution - ang get rid of
all my tables.

Don't be tempted to follow the CSS *fashion* trend just because a few others
say so. Tables will still be working fine 50 years from now and it seems
every third question is about people having problems with CSS.

Stick with the tried and tested tables.

Steve :~)
 
D

David Dorward

Sreve said:
Don't be tempted to follow the CSS *fashion* trend just because a few
others say so.

"a few others" being most of the experts who help people in this newsgroup
as well as the standards agency.
Tables will still be working fine 50 years from now and it

If people could accurately predict 50 years in to the future we would be
flying around and living on Venus by now.
seems every third question is about people having problems with CSS.

Its a complex, more powerful, more complicated technology with less
consistent browser implementation. It just takes a little longer to learn,
the results are worth it though.
Stick with the tried and tested tables.

Yes! Keep lying about your data!
 
B

brucie

For starters, suppose I want to create a template that has three
properties.

1. Is centered when printed.
2. Is 200px from the left when displayed.
3. Has a border around it.

<style type="text/css">
@media screen{div{margin-left:200px;}}
@media print{div{margin:auto;}}
@media screen,print{div{border:2px solid black;width:50%;}}
</style>

The problem with 3 is that if I place positioned div's inside my div,
it doesn't know to draw a border around the whole thing.

how about a url?
 

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,102
Messages
2,570,646
Members
47,247
Latest member
GabrieleL2

Latest Threads

Top