Log in

View Full Version : Errors in my CSS



sparklingsky
03-08-2009, 04:58 PM
Hello, I recently had my site reviewed and the biggest issue was definitely my coding, and the reviewers really bashed me for it. I'm having some trouble trying to figure what they mean and how to fix some of the mistakes they found. One thing they said was this:

"I took a lot at your coding and wow, your code is all over the place. Your title tags go in between the head tags, not at the top of the page. Your Doctype should be the first thing in your document. At the moment you’ve kind of confused the validator. I’m not really sure why you’ve got an internal stylesheet as well as an external one. Move everything to your external one to clean it up a bit, then move the external stylesheet link up to between your head tags.
Oh, you’ve got another bit of an external stylesheet down in your body. You’re also using a fair amount of deprecated tags, which would not be helping your validation. I’m going to recommend you read up on CSS and HTML."


So yeah, I'm really not the best when it comes to coding and I need things to be broken down thoroughly for me to be able to fix them. So I'm sure you can imagine how confusing that little excerpt must seem to me. I was wondering if somebody could help me out mainly with the internal/external style sheet problem, that it the biggest confusion I'm having right now. i would really appreciate it, thanks! Oh yes and my site is http://vivid-avenue.net

Snookerman
03-08-2009, 05:12 PM
This site should be helpful:
http://www.howtocreate.co.uk/tutorials/html/structure (http://www.howtocreate.co.uk/tutorials/html/structure)

Good luck!

sparklingsky
03-08-2009, 05:17 PM
Thanks I'll try that out. :D

Snookerman
03-08-2009, 05:21 PM
To get you started, I've fixed your head section, just remove everything you've got before the body section and replace it with this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>VIVID-AVENUE</title>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="stylesheet" type="text/css" href="css/lightbox.css" media="screen">
<link rel="stylesheet" type="text/css" href="http://www.vivid-avenue.net/layout/style.css" title="default">
<link rel="shortcut icon" type="image/x-icon" href="http://www.vivid-avenue.net/layout/favicon(12).ico">
<style type="text/css">
.wrap {
background: #e8f6fc;
overflow: hidden;
width: 200px;
}
ul {
list-style: none;
margin: 0;
padding: 0;
}
.partone {
float: left;
clear:right;
}
.parttwo {
float: right;
text-align: right;
}
</style>
</head>
<body>
There are however several other things that need fixing, use the W3 validator (http://validator.w3.org/) to find all the main errors.

Good luck!

sparklingsky
03-08-2009, 05:23 PM
In my header section I have things such as everything that is in my sidebar, my divs, etc. Should I be deleting all of this? Because if I put that code there instead my other information would be deleted?

sparklingsky
03-08-2009, 05:27 PM
OHH. Never mind, I just figured out what you meant. :D