...

View Full Version : Validation error with a </div> tag



ikaika
08-06-2011, 07:26 AM
Hey, I was validating a page on my site to see if I could figure out why the styles wasn't appearing in the browser and after a few other errors I came across this error:

Line 1710, Column 2: unclosed end-tag requires SHORTTAG YES
</div>

The construct </foo<bar> is valid in HTML (it is an example of the rather obscure “Shorttags” feature) but its use is not recommended. In most cases, this is a typo that you will want to fix. If you really want to use shorttags, be aware that they are not well implemented by browsers.

Line 1710, Column 1: expected '>'
</div>

i know this closing div tag is needed because it closes the content div in which i have my galleries div inside.


<!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">

<head>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />

<title>Summer Pics - The Inside Look</title>

<link rel="stylesheet" href="styles.css" type="css/text" media="screen" />
<link rel="stylesheet" href='css/hoverbox.css' type="text/css" media="screen, projection" />
<!--[if lte IE 7]>
<link rel="stylesheet" href='css/ie_fixes.css' type="text/css" media="screen, projection" />
<![endif]-->

</head>

<body>

<div id="container">
<div id="header">
<img class="head" src="header.png" alt="header image" />
</div>

<div id="wrapper">
<div id="nav">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Messages</a>
<ul>
<li><a href="eastmessages.html">Easter Camps</a></li>
<li><a href="summessages.html">Summer Camps</a></li>
</ul>
</li>
</ul>
<ul>
<li><a href="#">Pictures</a>
<ul>
<li><a href="#">Easter Camps</a></li>
<li><a href="#">Summer Camps</a></li>
</ul>
</li>
</ul>
<ul>
<li><a href="#">Videos</a>
<ul>
<li><a href="#">Easter Camps</a></li>
<li><a href="#">Summer Camps</a></li>
</ul>
</li>
</ul>

<br class="clearFloat" />

</div>
</div>


<div id="mainContent">

<div class="galleries">
</div
</div>

<div id="footer">

</div>
</div>
</body>
</html>

bullant
08-06-2011, 07:43 AM
The construct </foo<bar> is valid in HTML (it is an example of the rather obscure “Shorttags” feature) but its use is not recommended.

but your doctype ix XHTML

abduraooft
08-06-2011, 07:49 AM
<div class="galleries">
</div
</div>
Any clues?

ikaika
08-07-2011, 12:40 AM
i dont see what the problem could be. as far as i know, the use of all my div tags open and close are used properly and there arent too many or too few. i have no clue what the validator means here.

alykins
08-07-2011, 01:06 AM
i dont see what the problem could be. as far as i know, the use of all my div tags open and close are used properly and there arent too many or too few. i have no clue what the validator means here.

re-read abduraooft's comment...



<div class="galleries">
</div
</div>
Any clues?

this is pulled right from your code. Without counting them it looks like you have an extra closing div tag the part in red... if you do have the correct amount, and this is not an "extra" you still need to close it correctly


</div
needs to be

</div>

ikaika
08-08-2011, 07:11 AM
Thanks. I didn't see that the closing div tag wasn't closed correctly in abduraooft's comment. Thanks all for the help. It validates.

ikaika
08-08-2011, 07:22 AM
Can someone mark this as solved? I forgot how. Thanks.

alykins
08-08-2011, 04:46 PM
Can someone mark this as solved? I forgot how. Thanks.

glad you got it... goto your very first post in this thread... hit "edit" then hit "go advanced" then in the upper left there is a drop down list that is currently blank.... expand it and there will be the option "Resolved"



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum