I am always being asked the question why my Css doesn't work. Well, I had a tough experience learning css and at last a bit good at it. The most common question the css beginner should learn is the document type. Why? because the same css and html code dispay differently in different document type. I sometimes enconter people give out their html code and ask why the css doesn't work as follow. their html code begin with "<html>" , completely missing the document type. How can the browser know what document type is and display the right CSS , layout. All the document types are listed below. General speaking , some advance Css could only be support by strict type documents and Xhtml documents. You could also create the documents in Dreamweaver. File >> new document >> then at the right bottom of the option you can choose the document type. refer the the picture. in attachment file. html transitional document type <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> html strict document type <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> xhtml transitional document type <!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"> xhtml strict document type <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> xhtml 1.1 document type <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> Remember each time when talking about CSS and why css doesn't work. The first thing to consider is the document type. It is definitely important.
Thats a pretty nice post. Thanks for adding it to the community. I hope that lots of people starting to learn CSS and HTML will read this.