You're using footer p .right
and not footer p.right
(note the space character). This means the .right
and .left
classes don't apply to the paragraphs, but to child elements inside the paragraph. Or it could also mean a typo, causing your CSS to fail :)
Please copy your HTML here, so we can help you better.
Edit: I see you've now posted your HTML. My assumption turns out to be correct. Get rid of the spaces between p
and .left
/.right
. Also, if you're floating the paragraphs anyway, you can omit the text-align
properties.
#footer p.left {
float: left;
}
#footer p.right {
float: right;
}
Edit: In response to your comment: it should work. Here's a little test case:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html lang="en">
<head>
<title>Test case for the CSS footer problem</title>
<style type="text/css">
#footer { width: 300px; outline: 1px solid red; }
#footer p.left { float: left; }
#footer p.right { float: right; }
</style>
</head>
<body>
<p>See <a href="http://stackoverflow.com/questions/867587/css-footer-trying-to-split-into-2-columns" title="Stack Overflow: CSS footer; trying to split into two columns">http://stackoverflow.com/questions/867587/css-footer-trying-to-split-into-2-columns</a> for details.
<div id="footer">
<p class="left">Copyright © 2009</p>
<p class="right">Designed by xxxxxx</p>
</div>
</body>
</html>