Welcome to WebmasterWorld Guest from 54.161.208.7

Forum Moderators: incrediBILL

Message Too Old, No Replies

Detecting if browser will use CSS

I want to do different DocType if not CSS

     
10:19 pm on Feb 2, 2013 (gmt 0)

New User

5+ Year Member

joined:Dec 3, 2008
posts: 2
votes: 0


How could I detect if browser will use CSS?
I want to do different DocType if not CSS.
The reason I want to do this is I currently have a Table layout which works great but it won't validate with HTML5. So I want to keep my table layout when there is no CSS and design a new layout for HTML5.

Here are the hosting specs:
Apache version 2.2.21
PHP version 5.2.17
MySQL version 5.0.96-community-log
11:08 pm on Feb 2, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 7, 2003
posts:4783
votes: 0


There is no browser actively used that's not going to do CSS.

Even the very few special browsers (like those used to show braille, read out text, or pure text based browsers) will work a lot better it you forget about abusing tables for layout.

Just remove the tables and go for semantic markup in html and CSS for layout.
11:41 pm on Feb 2, 2013 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:13256
votes: 359


And besides...

The validator by itself doesn't know that you are using the tables for layout. So you're doing something else wrong. And it's likely to become even more visibly wrong if you disable the CSS.