Forum Moderators: open

Message Too Old, No Replies

valid css & xhtml 1.1 but page formats funny with doc type

         

emrys

5:14 am on Oct 18, 2004 (gmt 0)

10+ Year Member



Okay i'm sure you guys are sick of these questions but this is giving me fits, so i impore you to have a little patience :)
Anyway my CSS validates and if i add the doctype it validates as xhtml 1.1 transitional. But its layout gets screwed up. If i remove the doctype then it formats fine.
I'm thinking it has something to do with my use of tables instead of css for the layout but i'm not sure where to begin with that.

Thanks in advance
-emrys

<Sorry, no personal URLs. See TOS [webmasterworld.com]>

[edited by: tedster at 7:00 am (utc) on Oct. 18, 2004]

emrys

5:27 am on Oct 18, 2004 (gmt 0)

10+ Year Member



Okay an update. I developed and was viewing the site in Firefox 1.0PR1. I just took a look at it in IE6 and it seems to render correclty (for the most part). Okay i'm still at a loss though.

Thanks in advance
-emrys

rjohara

6:18 am on Oct 18, 2004 (gmt 0)

10+ Year Member



Welcome to WebmasterWorld. (The mods will probably delete your sample, since the board doesn't allow links.)

There is certainly some confusion somewhere. There isn't such a thing as "XHTML 1.1 Transitional" as far as I know. I don't know where you found the doctype you're using, but the URL in it points to the XHTML 1.0 Transitional doctype. The page isn't even close to real XHTML 1.1, which is a descendant of XHTML 1.0 Strict (not transitional).

I think the bottom line is, try putting a valid XHTML 1.0 Transitional doctype on both pages and start again from there.

tedster

7:05 am on Oct 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You've also got the symptoms of the "Quirks Mode" vs. "Standards Mode" blues that can strike when you view a layout in one of the new, standards compliant browsers such as FireFox or Opera.

Check out the follow thread and see if it sheds light on your situation.

Quirks Mode vs. Standards Mode [webmasterworld.com]

emrys

2:48 pm on Oct 18, 2004 (gmt 0)

10+ Year Member



Hello, thanks for your replies.
I guess what happened was it was xhtml 1.0 transitinal compliant and then i noticed that it validated as xhtml 1.1 so i just switched the badges. I just did some reading and realized that was pretty far off so i just changed it back. What seems to be happening is firefox is interpreting the page as an xml tree. Any idea what options i can enable to get it to read it as a xhmtl document?

Thanks again
-emrys

encyclo

3:14 pm on Oct 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First move is to put the following doctype at the top of your document:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Don't use XHTML 1.1 for this, although it shouldn't make a difference in practical terms.

Secondly, open the page in Firefox, then go to Tools > Page Info.

It should give a "Type" of

text/html
. What does yours say?

Finally, what if the file extemsion of your document? If you are not using any server-side technology, it should be

.html
or
.htm
, and not
.xhtml
.

emrys

4:36 am on Oct 19, 2004 (gmt 0)

10+ Year Member



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


I have this set for my doc type

Secondly, open the page in Firefox, then go to Tools > Page Info. It should give a "Type" of text/html. What does yours say?

It says "text/html"

Finally, what if the file extemsion of your document? If you are not using any server-side technology, it should be .html or .htm, and not .xhtml .

the extension is .php so yeah its serverside.

Thanks
-emrys