View Full Version : Resolved My HTML my CSS

09-08-2011, 12:47 PM
can someone tell me why my page isnt displaying my site correctly? it works fine on my computer then i upload it to my site and make ZERO changes and it doesnt display correctly.


09-08-2011, 12:49 PM
Because you forgot to close the div on line 112. :rolleyes:

09-08-2011, 01:15 PM
can someone tell me why my page isnt displaying my site correctly?
Site? Which site? You have posted no link, no code, no nothing. Do you think we have a magic bowl? :)

09-08-2011, 01:28 PM
No but he sees your avatar and knows you're a winner!:p

09-08-2011, 03:53 PM
Wow i make a mistake and not post the link and i get 4 replies i post i real problem and i rarely get one. here is the link http://syco-designz.webs.com/index.html

09-08-2011, 04:14 PM
How is it meant to normally come out? Could you provide a screenshot?

Also, you should include a Doctype, not providing one can cause errors in some browser if they assume it's one doctype/version and it's actually another.

09-08-2011, 04:18 PM
Also, you should include a Doctype, not providing one can cause errors in some browser if they assume it's one doctype/version and it's actually another.
Yes. I would even say that he must use a Doctype, otherwise the browsers will render in quirks mode, which is never standardized. Moreover, he must use the proper Doctype, according to the used dialect (HTML 4.01 or XHTML or HTML5). His case, probably XHTML.

09-08-2011, 04:27 PM
Its just HTML and CSS is this considered XHTML?

09-08-2011, 04:37 PM
Its just HTML and CSS is this considered XHTML?
It looks like you miss the basis of the basis of the web developing:

XHTML is a structured and strict dialect of HTML

Here's the Doctypes you may use, according to the dialects:

Now, the main difference between HTML and XHTML is that in XHTML the empty tags (like INPUT, BR, IMG...) are closed like: <input />, <br />, <img />... which is not the case in HTML. There are also other requirements, less important, especially in strict mode coding.

09-08-2011, 05:11 PM
i added the DOCTYPE and it still didnt seem to make any difference.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

What do you suggest i should do?


09-08-2011, 05:26 PM
Your doctype is not complete.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

You also have just a few errors (http://validator.w3.org/check?uri=http%3A%2F%2Fsyco-designz.webs.com%2Findex.html&charset=%28detect+automatically%29&doctype=Inline&group=0) in your code which should be fixed. Some of which stems from the incomplete doctype I'm thinking.

09-08-2011, 10:09 PM
I noticed in your CSS that you have:
font-family: Georgia; serif;

You should actually have that set as:
font-family: Georgia, serif;

09-08-2011, 10:39 PM
OK, I checked your HTML with http://validator.w3.org/ and saw the majority of your errors are fairly simple and could just be due to the need to research what version doctype to use and what the rules of that doctype are.

I suggest that you are closer to XHTML than HTML4, which in my opinion is is really good as it's a cleaner format.

First thing after getting a proper document type deceleration that I noticed was this:

<link href="css/style.css" rel="stylesheet" type="text/css" />

You'd probably get frustrated with the validator when it says that you haven't finished the <head>

The thing about <head> is that to be considered complete you need to include a <title> .. something like this:

<link href="css/style.css" rel="stylesheet" type="text/css" />
<title>Title Of Your Page</title>

Secondly I noticed saw this:

<div class="mid"><img src="logo2.gif" alt="Team Frog Logo" ></div>

For XHTML tags like img should be closed like this:

<div class="mid"><img src="logo2.gif" alt="Team Frog Logo" /></div>

Also you have used <hr> instead of <hr />

Both with the <img /> and <hr /> tags, you need that formatting in XHTML but not HTM4... in HTML4 it is simply just <hr> or <img>.

I assumed that as most of your tags are closed cleanly, for example your <br /> tags, that you are trying for closer to XHTML (Transitional?)

Finally, you made a typo right at the end... you typed &copy instead of &copy;
Although, I must congratulate you for knowing to use the proper amp entities... I see a lot of professional pages that don't.

I hope that was helpful... good luck with your webcoding!


09-09-2011, 12:07 AM
Just to add to this: New documents should always be created according to strict HTML standards, not transitional.

09-09-2011, 03:54 AM
So where did VIPStephen come up with his answer from? Just being funny?:rolleyes:

09-09-2011, 04:08 AM
Thanks guys just curious about something.
If my document does not pass the validation does this mean it wont display correctly when being parsed? and after making all the changes i only to my index page and no other the entire site displays correctly why is this?

09-09-2011, 04:54 AM
also i have been going thru each page because it doesnt actualy display correctly in IE of course and i dont under stand the map imput

Line 47, Column 17: required attribute "id" not specified

<map name="map" >

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.

I already have text/css declared in the <head>

09-09-2011, 05:42 AM
Thanks everyone i have fixed all errors and the site displays correctly.