Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Doctype header causing problem

Status
Not open for further replies.

bludonda

Technical User
Jun 20, 2002
18
US
I have discovered that the doctype header I've been putting in my pages causes the text on the page to be centered in table cells, but only in IE 6.x. They display fine in IE 5.x.

Here's the header code:

Code:
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;
        &quot;[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd&quot;>[/URL]

Removing it causes the text to display as specified.

Does anyone have any idea what the heck is going on here?

Thanks.
= = = = = = = =​
&quot;Everything you know is wrong!&quot; ~ Firesign Theater
 
Hi,

You probably aren't using valid html if it is screwing up when you insert the doctype, what is your code?

Nate

mainframe.gif

 
Thanks again Spyderix,

Yes, or so the W3C validator says. And all but two of the errors are generated by line 35 which is a Google site search function, the code of which is supplied to me by the all-wise and all-knowing Information Management Department and therefore unassailable in it's veracity. So there W3C!

Seriously though, the only other errors that I have control over are the two on lines 21 and 89.

21 is a &quot;height&quot; attribute which is a valid HTML attribute to my knowledge, and it didn't single out any of the other &quot;height&quot; attributes used in the page.

However, line 89 is a &quot;name&quot; attribute that good ol' Dreamweaver 4.0 thinks is a great idea for table tags, and who am I to argue?

Well, you learn something new every day, and indeed your solution is the most simplest of simple for this problem. I'll start doing that to the pages I put the header in and also stop using the &quot;name&quot; attribute, (which I thought was perfectly acceptable and kind of helpful. Or, maybe I'll just drop the doctype header since it's the real trouble maker here - or is that just killing the messenger?).

God knows I want to be compliant and valid, but I'm not sure what I can do about the site search code.

I'd still like to know why it only shows up in IE 6.x, though.
 
Because Internet Explorer (as a friend of mine pointed out to me in a test once) is horrible at outputting html. It is the worst browser. It is an M$ product that has most likely been rushed into production and is still full of bugs. That's possibly why it's doing that.

Nate

mainframe.gif

 
Thanks Nate,

And I thought MS IE 6 was supposed to be the most W3C complient of the IE iterations so far. Maybe they've channeled their efforts in to &quot;security&quot; features instead of complient coding.

Whahtevah!

Have a great week otherwise!

Ciao!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top