Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

XHTML Issues - doctype

not working with css

3:49 am on Mar 17, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 1, 2004
votes: 0

For some strange reason my search input box on my site losses the css style ie: border color, size etc..when i use the doctype below. Alse when using the doctype below in my documents its not allowing me to use scrollbar color change code in my css.

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

What causes this to happern?

10:43 am on Mar 17, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 26, 2004
votes: 0

At a guess, are you serving your CSS files with the correct media type? It should be ‘text/css’. You can check this if you’re using Firefox by going directly to the CSS file (in the address bar), going to Tools / Page Info and checking the Type field.
12:55 pm on Mar 17, 2007 (gmt 0)

Senior Member

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

joined:July 3, 2006
posts: 3123
votes: 0

When you are not using your "XHTML 1.0 Transitional" DOCTYPE, what DOCTYPE are you using (if any)?

Certainly WITHOUT a DOCTYPE, CSS can behave very differently - with IE not cascading styles properly etc. etc.