Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New to the CF scene
    Join Date
    May 2011
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Validation error with a </div> tag

    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.

    Code:
    <!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>

  • #2
    Banned
    Join Date
    Feb 2011
    Posts
    2,699
    Thanks
    13
    Thanked 395 Times in 395 Posts
    Quote Originally Posted by ikaika View Post
    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

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Code:
    <div class="galleries">
    		</div
    	</div>
    Any clues?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    ikaika (08-08-2011)

  • #4
    New to the CF scene
    Join Date
    May 2011
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts
    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.

  • #5
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,718
    Thanks
    41
    Thanked 191 Times in 190 Posts
    Quote Originally Posted by ikaika View Post
    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...

    Quote Originally Posted by abduraooft View Post
    Code:
    <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

    Code:
    </div
    needs to be
    Code:
     </div>

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • Users who have thanked alykins for this post:

    ikaika (08-08-2011)

  • #6
    New to the CF scene
    Join Date
    May 2011
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts
    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.

  • #7
    New to the CF scene
    Join Date
    May 2011
    Posts
    8
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Can someone mark this as solved? I forgot how. Thanks.

  • #8
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,718
    Thanks
    41
    Thanked 191 Times in 190 Posts
    Quote Originally Posted by ikaika View Post
    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"

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •