Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

my css file is not linking or changing the style of my xhtml file 1

Status
Not open for further replies.

ashstampede

Programmer
Aug 30, 2004
104
GB
I have not done any complicated code or styles. I have just started adding text formatting. But when I test the page in my browser it is just html. I have validated both my css and xhtml page and there are no warnings or errors on either page.
What could be wrong?

css file as follow it is called main.css
Code:
body{
background-color:#ffffff;
color:#000000;
margin:0px;
padding:0px;
}
a{
    background-color:#ffffff;
    color:#a35540;
}
a:visited{
   background-color:#ffffff;
   color:#5c3e90;
}

div#Header{
 height:111px;
 background-color:#1bbd1b;
 color:#ffffff;
}

div#Breadcrumb{
}
   
div#Content{
	background-color:#cbe846;
	color:#000000;
	position:absolute;
	left:50%;
	width:500px;
	margin-top:50px;
	margin-left:-266px;
	padding:15px;
	}

div#Menu{
  width:135px;
  background-color:#ff752a;
  color:#ffffff;
}

a.nav:link{
	color:#ffffff;;
	text-decoration:none;
	background-color:#ff752a;
}
    
a.nav:visited{
	 color:#ffffff;
	 text-decoration:none;
	 background-color:#ff752a;
}
		    
a.nav:hover, a.nav:active{
    color:#a35540;
    background-color:#ff752a;
    text-decoration:none;
    
}

xhtml file as followed
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>
 Cooking Site - index -
</title>

<link rel="stylessheet" type="text/css" href="main.css" media="screen"/>
</head>

<body>

<div id="Header">Cooking Site</div>
<div id="Breadcrumb"><a href="index.htm">Home</a></div>
<div id="Content">
 <h2>Welcome</h2>
</div>

<div id="Menu">
	<a class="nav" href="beef.htm" title="Beef Recipes">Beef</a><br />
	<a class="nav" href="chicken.htm" title="Chicken Recipes">Chicken</a><br />
	<a class="nav" href="fish.htm" title="Fish Recipes">Fish</a><br />
	<a class="nav" href="pork.htm" title="Pork Recipes">Pork</a><br />
	<a class="nav" href="vegetarian.htm" title="Vegetarian Recipes">Vegetarian</a><br />
	<a class="nav" href="pasta.htm" title="Pasta Recipes">Pasta</a><br />
	<a class="nav" href="salad.htm" title="Salad Recipes">Salad</a><br />
	<a class="nav" href="sandwiches.htm" title="Sandwiches Recipes">Sandwiches</a><br />
	<a class="nav" href="soups.htm" title="Soup">Soups</a><br />
	<a class="nav" href="submit.htm" title="Submit Recipes">Submit Recipe</a><br />
	<a class="nav" href="find.htm" title="Find Recipes">Find Recipe</a><br />
	<a class="nav" href="glossary.htm" title="Glossary">Glossary</a><br />
</div>

</body>
</html>
 
yes, yes it does help. I feel like a turd right now, why did that validate then!? anyway thanks a ton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top