By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,991 Members | 1,887 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,991 IT Pros & Developers. It's quick & easy.

CSS not working with XHTML

P: n/a
I have the following XHTML, and it links to page.css (which does
exist). Before I put in the xml decleration, doctype and html, it
worked. Now, the css is ignored. (FF1507Win98)

Any ideas?

--------------
<?xml version="1.0" encoding="UTF-8"?>
<!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" xml:lang="en">
<head>
<title>My Home Page</title>
<link rel="stylesheet" type="text/css" title="Blue and Orange"
href="page.css" />
</head>
<body>
<h1 id="PageTitle"><span>Smarty example website - My Home
Page</span></h1>
<div id="MainText">
Hello Peoples.
</div>

<h1 id="FooterText">This website, it's design, contents, data and
concept are the copyright material of Peter Ward.</h1>

</body>
</html>

-----------------
page.css:

body { overflow: hidden; background-color: #ABCDEF; color: #339900; }
#PageTitle { text-align: center; font-weight: normal; color: #339900;
background-color: #FF9900; border: solid #D5B377 4px; }
#MainText { position: absolute; top: 20%; left: 10%; width: 80%;
padding: 0px; margin: 0px; text-align: center; font-size: 28pt; color:
#339900; background-color: #FEDCBA; border: solid #D4D4D4 4px; }
#FooterText { position: absolute; bottom: 0px; left: 0px; width: 104%;
height: 28px; padding: 0px; margin: 0px; text-align: center; font-size:
14pt; background-color: #000000; color: #FFFFFF; }

Sep 28 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.