I’ve been writing HTML for years but have been very lazy about switching to XHTML. I am now biting that bullet and trying write in XHTML.
I have discovered, however, that some CSS I write doesn’t work in XHTML. I can’t see anything wrong with it. Everything is lower case. Everything is properly separated with semi-colons. It works in straight HTML.
Here’s a snippet of test code that doesn’t work.
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “
<!–
–>
<html xmlns=”
<head>
<title>This is a test</title>
</head>
<body>
<div id=”chkxhtml” style=”position:absolute;top:200;left:100;background:red;color:white;width:100;height:100;”>
<p>Write stuff here</p>
</div>
</body>
</html>
The positioning doesn’t work and I can’t figure out why. I know I’m missing something, but I can’t find anything on the Net which would direct me to what I am doing wrong.
Thank you for your time.