doctype centers things

  • Thread starter Catherine Jo Morgan
  • Start date
C

Catherine Jo Morgan

On the test page at http://www.cjmorgan.com/modern-abstract-art.htm if I add
a doctype declaration above the <html> then it looks ok in normal view, but
in preview the H1 and left hand navigation are both centered.

The doctype I tried is
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

Maybe I need a different one? Or maybe there's something else I need to do
to make this work? Without the doctype the page seems ok. TIA
 
R

Ronx

I don't know if this is the cause, but there is a table where the cells add
up to 110% of the tables width....
 
K

Kathleen Anderson [MVP - FP]

Catherine:
IIRC, with that DOCTYPE, cell contents inherit their alignment from that
specified for the table. So if a table is centered, you need to specify
different alignment for the cells if you don't want them centered as well.
 
C

Catherine Jo Morgan

Someone pointed out some <center> code that I hadn't seen was there. When I
took it out, the problem disappeared. Thanks for help from both of you.
 

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

Similar Threads

Force Character Encoding 9
doctype choice? 12
DocType 1
Doc Type in FrontPage Webs 1
Website display varies with the following browser versions... 4
What! Why? 3
php 4
DOCTYPE problems with scroll-bars 9

Top