css - check browser

A

APT

I am finding that obsolute positioning with CSS is not cross browser.
Mozilla interprets the position much different that IE.

How do I get my page to check the users browser and then use a specific
style sheet depending on their browser?

Here is the page: http://www.hainesdolphins.org/kayak/html/index.php
If you check it in IE and then Mozilla you'll see very different alignments
on the right :(

Or maybe there is another solution?

Thanks.
 
E

Els

APT said:
I am finding that obsolute positioning with CSS is not cross browser.
Mozilla interprets the position much different that IE.

How do I get my page to check the users browser and then use a specific
style sheet depending on their browser?

Here is the page: http://www.hainesdolphins.org/kayak/html/index.php
If you check it in IE and then Mozilla you'll see very different alignments
on the right :(

Or maybe there is another solution?

You're not using a doctype, which throws IE into quirks mode, while
Mozilla probably follows the standards, which is different.
Use a doctype and it might solve your problem.
 
A

APT

I just stuck in a generic doctype. It still doesn't work.

It actually works in IE and not in Mozilla.
Thanks for the quick response though.

Steve
 
E

Els

Hi Steve/APT,

Please look for your message below, as we read from top to bottom in
this newsgroup.
I just stuck in a generic doctype. It still doesn't work.

It actually works in IE and not in Mozilla.
Thanks for the quick response though.

That's because "a generic doctype" isn't good enough. You need to
include a dtd, like so:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

or so:

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

Use the former if you want to conform to the standards, or the latter
if you want to keep using deprecated elements.
 
A

APT

Els said:
Hi Steve/APT,

Please look for your message below, as we read from top to bottom in
this newsgroup.



That's because "a generic doctype" isn't good enough. You need to
include a dtd, like so:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

or so:

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

Use the former if you want to conform to the standards, or the latter
if you want to keep using deprecated elements.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Madness - Michael Caine


Looks like I am going to have to do the CSS over. The doctype cetainly
changes the pages appearance. I will have to go back and tiddy up my code.

Thanks for the help... (and the tip on posting at the bottom of the
message.)

Steve
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top