I am working on a website and I am currently trying to make it look more proffesional with the help of CSS(I am writing this all myself, not using a generator). Recently I installed something that would make a more professional. The only problem is that whenever I look at it through IE or FF the entire CSS page does not load for me. It is either the background, the buttons, or I recieve an old version of my code.

How can I orginize or optimize my CSS sheet to work more properly on a webpage?

/*The CSS page for the site*/

body {






/* Unlisted list */

/* Verticle dash bar */


/* Verticle dash bar */

a:link {color:red;}      /* unvisited link */
a:visited {color:blue;}  /* visited link */
a:hover {color:white;text-decoration:underline;}  /* mouse over link */
a:active {color:purple;text-decoration:line-through;}  /* selected link */

So you can't see your css styles show up at all?

Did you link your css file to your html inside your head tag?
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />

yes, i linked it in the head tag. For some reason I sometimes do not get the background image, and I never get the verticle dashbar to work in IE. I made sure I called the class "DB" in my links that I wish to show up as specified.

Can you post your html aswell?

As stilts says, can you post the html too? Your problem isn't likely to be the organization of the css. The path to the body background image and its name are OK? Can you explain "It is either the background, the buttons, or I recieve an old version of my code." a bit more? What is the vertical dashbar? It's an unordered list but doesn't have any dimensions or anything styled inside it.

my HTML is this:

<!DOCTYPE HTML PUBLIC "//Pure Caos//DTD HTML 4.01 Transitional//EN"> 


<meta name="description" content="The home page for sales of web pages online." /> 
<meta name="keywords" content="Pure Caos, sales, web development, quotes, web sites, mangagement" /> 
<title>Caos Studio</title>
<link rel="stylesheet" type="text/css" href="God.css" />


<!-- The "main" page for Pure Caos Studios -->

<!-- Body of the site -->
<table border="1" align=center width="900" height="700" bgcolor=#000000>
		<td style="color:white"><img src="Bios/images/Corner.png" alt="Corner"/></td>
		<td class="title" width="75%" >Pure Caos Studios</td>

	<tr height="75%">
		<td valign=top>
			<ul class="Dashbar">
				<li><a class="DB" href="index.html">Home</a></li>
				<li><a class="DB" href="About_us.html">About us</a></li>
				<li><a class="DB" href="Downloads.html">Downloads</a></li>
				<li><a class="DB" href="forum">Forum</a></li>
				<li><a class="DB" href="Bios.html">Bios</a></li>
				<li><a class="DB" href="Contact_us.html">Contact us</a></li>
		<!-- updates go here -->
		<td style="color:white" width="75%" valign=top align=left>

<h2>made in 2011, by Reed Norstrom.</h2>

<p align=center>

<script type="text/javascript"><!--
	google_ad_client = "ca-pub-5994993549816675";
	/* Support Pure Caos */
	google_ad_slot = "5439087144";
	google_ad_width = 728;
	google_ad_height = 90;
<script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>



<!-- V 1.01 -->

to explain for tenbears. everytime I attempt to load my website somthing goes from my CSS sheet.

  • The repeated background image does not load and the background is then white
  • the buttons do not use the DB class that I made within the style sheet, they are just the default i have described after the virtcle dashbar
  • I atempt to fix these problems by refreshing my screen thinking they were browser errors and I end up getting one of earlier versions of this website. I can tell because each time I check the source code to determine if that is what happened. (this is more uncommon)

the verticle dashbar is supposed to take the links that I specify by adding the DB class to them. the links should have a clickable area around them of about of about 120 pixels, have the text centered, make the font bold and uppercase with the text white with a black background. then the background turns into a dim gray when your mouse is put overtop of it.

I hope this explains well enough what is going on.

Start with validating your page. Then stop using tables for layout and deprecated attributes.


thank you arkinder, that is why I am moving everything into CSS. So I will stop using deprecated attributes. after that I will get rid of the simple table layout.

thank you for the valadator link though, it will be very good resource later.

If you look at the validator now, you'll see immediately that 'Pure Caos' shouldn't be in the doctype. If you declare the body background as black in your css, then you'll at least have the colour you want even if your image doesn't load. Your buttons actually work as you want them in Firefox 5. It's best to test on as many modern browsers as possible, starting with Firefox, and using Firebug to help you.
Hope that helps a bit.

ok, thank you. those resources may be very good with helping me out to figure out how to fix these errors (I most likely made myself).

Thanks everyone

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.