Forum Moderators: not2easy

Message Too Old, No Replies

changing the doctype

I've got the dtd's

         

theonliest

1:05 pm on Jun 22, 2004 (gmt 0)

10+ Year Member



A strange request perhaps, but does anyone know how I can change a pages doctype depending on what browser is viewing it?

Basically I've built a page using css-p and with a strict doctype, but it's seriously crashing on IE5 for the mac (the client is an avid mac fan (aren't they all!)) but is useable on mac if I put in a 'quirky' doc type.

So, basically I need to just change the first line, not the whole page, is this a pointless exercise?

encyclo

1:24 pm on Jun 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you're using a server-side scripting language such as PHP, it is quite easy to do - you check the user agent string and return the appropriate doctype whether it's a Mac or something else. If you're using static pages, I'm not sure you can do much.

theonliest

2:46 pm on Jun 22, 2004 (gmt 0)

10+ Year Member



thanks for that but I really don't want to get into PHP (possibly because I know nothing about it!)

what I'd really like to do is to get my page to vertically center as desicribed here [wpdfd.com] but with a 'stict' doctype, which is wot's throwing it off in IE5mac

may have to revert to tables, so much for progress!