text-align: center in xhtml?

B

Beck

I have quite a bit of a problem.. I cant align my content to center with css
in the xhtml 1.1 strict doctype?

how to work around for this to work and validate?
 
M

Mark Parnell

In our last episode said:
I have quite a bit of a problem.
URL?

I cant align my content to center with css
in the xhtml 1.1 strict doctype?

Why not?
how to work around for this to work and validate?

Without a URL it is impossible to say what you are doing wrong.
 
D

David Dorward

Beck said:
I have quite a bit of a problem.. I cant align my content to center with
css in the xhtml 1.1 strict doctype?

There is no XHTML 1.1 strict Doctype.

There is XHTML 1.1 ... which is mostly pointless as it lacks the "Can be
served as text/html profile", which makes it pretty much useless (goodbye
MSIE, goodbye Googlebot, etc).

There is XHTML 1.0 Strict ... which is also mostly pointless as Appendix C
is silly, and if you use it then you can no benefits over HTML 4.01, but a
couple of problems.

My guess is that your choice of Doctype is triggering standards mode in your
browser and text-align: center has stopped centring block content.

See http://dorward.me.uk/www/centre/
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top