Jeff wrote:
> Below you see the html and css of my site. The problem is that I don't
> see any effect of the css on the layout of the page. hence the css
> has no effect. I'm not sure what causes this., you got any
> suggestions?
Yes. Post a URL instead.
> the html and css validates
However, it is still incorrect. For some value of incorrect.
> html:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Why are you doing new work using Transitional? Use HTML 4.01 Strict
instead. (Remove the extra slashes at the end of those link elements)
> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
>
> <head>
> <title>this is the title</title>
> <link rel="canonical" href="http://www.mysite.com" />
> <link href="css/layout.css" rel="stylesheet" type="text/css" />
> </head>
>
> <body>
> body
Be sure to enclose loose 'body content' in some sort of container
element.
<div>body</div>
> <div id="content"> <------- an "id"
> content
> </div>
> </body>
>
> </html>
>
> css:
> body
> {
> margin:0px;
> font-family:Arial, Verdana, Sans-Serif;
> font-size:12px;
> color:Black;
> background-color:Yellow;
> }
> .content <--------- a "class" not an "id"
> {
> width:800px;
> margin-left:auto;
> margin-right:auto;
> background-color:#ccddee;
> }
Change the style sheet's ".content" to "#content"
Consider also not using fixed-pixel layout, and use percentages for font
sizing. Sans-Serif should be sans-serif. Verdana is not recommended.
--
-bts
-Four wheels carry the body; two wheels move the soul
|