I have been trying to learn HTML/CSS for about a year now as a hobby and I have developed a good base knowledge and I figured before I got to far ahead of myself I would learn all of the proper rules, so I have begin to read HTML 4.01 Specification from the W3C website. I have add the fowling DTD to my HTML code and it causes my style to loose all back ground color. Is the problem in my HTML or could it be in my CSS. I have attached my .php. It works just fine with out the DTD in the first line. Thanx in advance

Lanier

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

I suggest that you move to xhtml.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">

minor bug with this, the doctype is html 4, so xml namespaces are illegal.

bangs head on desk,
read the prior post about shift to xhtml, and messed up
things you do, without thinking, bite you in the bum

switching to XML did the trick, plus another rung in the latter of learning. Thanx MM

Lanier

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.