My index.php The W3C validators problems
05-25-2009, 09:44 AM
|
My index.php The W3C validators problems
|
Posts: 10
|
Can anybody fix it ?
here is the validator problems link
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.torfil.com%2F&charset=( detect+automatically)&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.654
Here is the index.php
< Index
PHP Code:
<?php get_header(); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <div class="post-header"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <div class="date"><span><?php the_time('Y') ?></span> <?php the_time('F j') ?></div> <div class="comments"><?php comments_popup_link('Leave a comment', '1 Comment', '% Comments'); ?></div> </div><!--end post header--> <div class="meta clear"> <div class="tags"><?php the_tags('tags: ', ', ', ''); ?></div> <div class="author">by <?php the_author() ?></div> </div><!--end meta--> <div class="entry clear"> <?php the_content('read more...'); ?> <?php edit_post_link('Edit This','<p>','</p>'); ?> <?php wp_link_pages(); ?> </div><!--end entry--> <div class="post-footer"> <p>from → <?php the_category(', ') ?></p> </div><!--end post footer--> </div><!--end post--> <?php endwhile; /* rewind or continue if all posts have been fetched */ ?> <div class="navigation index"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div><!--end navigation--> <?php else : ?> <?php endif; ?> </div><!--end content--> <?php get_sidebar(); ?> <?php get_footer(); ?>
Header
PHP 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 profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="http://feeds2.feedburner.com/Torfil" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<!--[if lt IE 7.]> <script defer type="text/javascript" src="<?php bloginfo('template_directory'); ?>/pngfix.js"></script> <![endif]-->
<?php wp_head(); ?> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> </head> <body>
<!-- Header --> <div id="header"> <div id="header-shrink">
<!-- Branding --> <div id="branding-body"> <div id="logo"> <a href="<?php echo get_option('home'); ?>/"><img src="<?php bloginfo('template_directory'); ?>/images/Header-Logo.png" alt="<?php bloginfo('name'); ?>" /></a> </div><!-- /Logo --> </div><!-- /Branding Body -->
<div id="search-body"> <div> <form id="searchform-top" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <input type="text" name="s" id="s-top" value="Search" onfocus="if (this.value == 'Search...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search';}" /> <input id="submit-top" type="image" src="<?php bloginfo('template_url'); ?>/images/Arama-butonu.png" value="Go" /> </form> </div> </div>
<!-- Navigation --> <div id="navigation-bar"> <div id="navigation"> <ul> <li<?php if ( is_home() or is_archive() or is_single() or is_paged() or is_search() or (function_exists('is_tag') and is_tag()) ) { echo ' class="current_page_item"'; } ?>><a href="<?php echo get_option('home'); ?>">Home</a></li> <?php wp_list_pages('depth=-1&sort_column=ID&title_li='); ?> </ul> </div><!-- /Navigation --> </div><!-- /Navigation-bar -->
</div><!-- /Header Shrink --> </div><!-- /Header -->
Footer
PHP Code:
</div><!-- /Content -->
<!-- Footer --> <div id="footer">
<!-- Footer-Shrink --> <div id="footer-shrink"> <a href="http://www.torfil.com/#">TorFiL © 2009</a> <a href="http://www.torfil.com/contact-form">Contact Form</a> <a href="http://www.torfil.com/about">About</a> <div style="clear:both;"><!--IE6FIX--></div>
<div id="footer-text"> </a>You can download whatever you want.</a> </div><!-- /Footer-Shrink -->
</div><!-- /Footer -->
</body> </html>
Last edited by Darker81; 05-25-2009 at 12:44 PM..
|
|
|
|
05-25-2009, 10:39 AM
|
Re: My index.php The W3C validators problems
|
Posts: 10
|
waiting for reply
|
|
|
|
05-25-2009, 10:46 AM
|
Re: My index.php The W3C validators problems
|
Posts: 10,289
Name: Knight13
Location: Cleveland, Ohio
|
Their must be a header and a footer section to your website, and i believe that is where the errors are coming from, you should put the code for the header and footer pages in the forum also. that way they can be looked at.
|
|
|
|
05-25-2009, 11:28 AM
|
Re: My index.php The W3C validators problems
|
Posts: 10
|
Header.php
<!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 profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="http://feeds2.feedburner.com/Torfil" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="<?php bloginfo('template_directory'); ?>/pngfix.js"></script>
<![endif]-->
<?php wp_head(); ?>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
</head>
<body>
<!-- Header -->
<div id="header">
<div id="header-shrink">
<!-- Branding -->
<div id="branding-body">
<div id="logo">
<a href="<?php echo get_option('home'); ?>/"><img src="<?php bloginfo('template_directory'); ?>/images/Header-Logo.png" alt="<?php bloginfo('name'); ?>" /></a>
</div><!-- /Logo -->
</div><!-- /Branding Body -->
<div id="search-body">
<div>
<form id="searchform-top" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<input type="text" name="s" id="s-top" value="Search" onfocus="if (this.value == 'Search...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search';}" />
<input id="submit-top" type="image" src="<?php bloginfo('template_url'); ?>/images/Arama-butonu.png" value="Go" />
</form>
</div>
</div>
<!-- Navigation -->
<div id="navigation-bar">
<div id="navigation">
<ul>
<li<?php if ( is_home() or is_archive() or is_single() or is_paged() or is_search() or (function_exists('is_tag') and is_tag()) ) { echo ' class="current_page_item"'; } ?>><a href="<?php echo get_option('home'); ?>">Home</a></li>
<?php wp_list_pages('depth=-1&sort_column=ID&title_li='); ?>
</ul>
</div><!-- /Navigation -->
</div><!-- /Navigation-bar -->
</div><!-- /Header Shrink -->
</div><!-- /Header -->
footer.php
</div><!-- /Content -->
<!-- Footer -->
<div id="footer">
<!-- Footer-Shrink -->
<div id="footer-shrink">
<a href="http://www.torfil.com/#">TorFiL © 2009</a> <a href="http://www.torfil.com/contact-form">Contact Form</a> <a href="http://www.torfil.com/about">About</a>
<div style="clear:both;"><!--IE6FIX--></div>
<div id="footer-text">
</a>You can download whatever you want.</a>
</div><!-- /Footer-Shrink -->
</div><!-- /Footer -->
</body>
</html>
|
|
|
|
05-25-2009, 12:27 PM
|
Re: My index.php The W3C validators problems
|
Posts: 258
|
If you use the PHP tags it would make it a lot easier for us to help you.
__________________
Alex
|
|
|
|
05-25-2009, 12:41 PM
|
Re: My index.php The W3C validators problems
|
Posts: 10
|
Index
PHP Code:
<?php get_header(); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <div class="post-header"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <div class="date"><span><?php the_time('Y') ?></span> <?php the_time('F j') ?></div> <div class="comments"><?php comments_popup_link('Leave a comment', '1 Comment', '% Comments'); ?></div> </div><!--end post header--> <div class="meta clear"> <div class="tags"><?php the_tags('tags: ', ', ', ''); ?></div> <div class="author">by <?php the_author() ?></div> </div><!--end meta--> <div class="entry clear"> <?php the_content('read more...'); ?> <?php edit_post_link('Edit This','<p>','</p>'); ?> <?php wp_link_pages(); ?> </div><!--end entry--> <div class="post-footer"> <p>from → <?php the_category(', ') ?></p> </div><!--end post footer--> </div><!--end post--> <?php endwhile; /* rewind or continue if all posts have been fetched */ ?> <div class="navigation index"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div><!--end navigation--> <?php else : ?> <?php endif; ?> </div><!--end content--> <?php get_sidebar(); ?> <?php get_footer(); ?>
Header
PHP 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 profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<title><?php bloginfo('name'); ?> <?php if ( is_single() ) { ?> » Blog Archive <?php } ?> <?php wp_title(); ?></title>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="http://feeds2.feedburner.com/Torfil" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<!--[if lt IE 7.]> <script defer type="text/javascript" src="<?php bloginfo('template_directory'); ?>/pngfix.js"></script> <![endif]-->
<?php wp_head(); ?> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> </head> <body>
<!-- Header --> <div id="header"> <div id="header-shrink">
<!-- Branding --> <div id="branding-body"> <div id="logo"> <a href="<?php echo get_option('home'); ?>/"><img src="<?php bloginfo('template_directory'); ?>/images/Header-Logo.png" alt="<?php bloginfo('name'); ?>" /></a> </div><!-- /Logo --> </div><!-- /Branding Body -->
<div id="search-body"> <div> <form id="searchform-top" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <input type="text" name="s" id="s-top" value="Search" onfocus="if (this.value == 'Search...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search';}" /> <input id="submit-top" type="image" src="<?php bloginfo('template_url'); ?>/images/Arama-butonu.png" value="Go" /> </form> </div> </div>
<!-- Navigation --> <div id="navigation-bar"> <div id="navigation"> <ul> <li<?php if ( is_home() or is_archive() or is_single() or is_paged() or is_search() or (function_exists('is_tag') and is_tag()) ) { echo ' class="current_page_item"'; } ?>><a href="<?php echo get_option('home'); ?>">Home</a></li> <?php wp_list_pages('depth=-1&sort_column=ID&title_li='); ?> </ul> </div><!-- /Navigation --> </div><!-- /Navigation-bar -->
</div><!-- /Header Shrink --> </div><!-- /Header -->
Footer
PHP Code:
</div><!-- /Content -->
<!-- Footer --> <div id="footer">
<!-- Footer-Shrink --> <div id="footer-shrink"> <a href="http://www.torfil.com/#">TorFiL © 2009</a> <a href="http://www.torfil.com/contact-form">Contact Form</a> <a href="http://www.torfil.com/about">About</a> <div style="clear:both;"><!--IE6FIX--></div>
<div id="footer-text"> </a>You can download whatever you want.</a> </div><!-- /Footer-Shrink -->
</div><!-- /Footer -->
</body> </html>
Sorry i dont know how i do before
|
|
|
|
05-25-2009, 12:42 PM
|
Re: My index.php The W3C validators problems
|
Posts: 10
|
i think it is very clear now 
|
|
|
|
05-25-2009, 09:56 PM
|
Re: My index.php The W3C validators problems
|
Posts: 258
|
Thanks for the edits. Okay, on your first mistake make sure all the styles are in the header or in a separate file. You have the <style> tag in the middle of a div attribute.
Second, I'd just like to include this, but it seems like you have way to much code for your page. Correct me if I'm mistaken, but it seems like you're using an XML database. If you are, stop. Your site is way to big to be using an XML database. Try using mySQL, msSQL, or something advanced like that. You're page will load a lot faster because you'll end up with less code.
As for that most of your mistakes are for having attributes out of place, and too many div tags (i.e. XML Parsing Error: Opening and ending tag mismatch: input line 611 and div). You'll need to go over the whole site again and fix them. It's going to be a long process so I'm not going to do it.
Once you clean up the code and make it shorter, count the divs and make sure there aren't too many than you can post again and I'll help you out more.
Good luck on your site
__________________
Alex
|
|
|
|
05-26-2009, 06:36 AM
|
Re: My index.php The W3C validators problems
|
Posts: 10
|
Thanks for your comment i will try to fix again i am using wordpress google xml sitemap plugin. I will try again and if cant do i will post again thanks for comments
|
|
|
|
05-27-2009, 10:55 AM
|
Re: My index.php The W3C validators problems
|
Posts: 10
|
The last problem w3c :s
Line 122, Column 23: document type does not allow element "style" here <style type="text/css" > ✉
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
PHP Code:
<div id="toolbar-body"> <script type="text/javascript" src="http://www.torfil.com/jquery-1.2.6.pack.js"></script> <script type="text/javascript" src="http://www.torfil.com//stepcarousel.js">
<!-- /*********************************************** * Step Carousel Viewer script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com) * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts * This notice must stay intact for legal use ***********************************************/ -->
</script>
<style type="text/css">
.stepcarousel{ position: relative; /*leave this value alone*/ border: 5px solid #34C2F0; overflow: scroll; /*leave this value alone*/ width: 900px; /*Width of Carousel Viewer itself*/ height: 165px; /*Height should enough to fit largest content's height*/ background:#B4E058; }
.stepcarousel .belt{ position: absolute; left: 0; top: 10; }
.stepcarousel .panel{ float: left; /*leave this value alone*/ overflow: hidden; /*clip content that go outside dimensions of holding panel DIV*/ margin: 11px; /*margin around each panel*/ width: 115px; /*Width of each panel holding each content. If removed, widths should be individually defined on each content DIV then. */ height: 150px; /*Height should enough to fit largest content's height*/ }
</style>
<!-- Myslides --> <div align="center" id='myslides' class='content2'> <script type='text/javascript'> stepcarousel.setup({ galleryid: 'mygallery', //id of carousel DIV beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs panelclass: 'panel', //class of panel DIVs each holding content panelbehavior: {speed:500, wraparound:true, persist:true}, defaultbuttons: {enable: true, moveby: 2, leftnav: ['http://www.torfil.com/rem1.jpg', -14, 60], rightnav: ['http://www.torfil.com/rem2.jpg', 0, 60]}, statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels contenttype: ['external'] //content setting ['inline'] or ['external', 'path_to_external_file'] }) </script> <div class='stepcarousel' id='mygallery'> <div class='belt'> <div class='panel'> <a href='http://www.torfil.com/29-mirrors-single-link-the-unborn-2009-dvdrip-xvid-ika/' title='[29 Mirrors | Single Link] The Unborn 2009 DVDRiP XViD-iKA'><img alt='The Unborn 2009 ' height='148' src='http://i44.tinypic.com/2ueipud.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/damnation-iso-2009enggerrepack-384-gb-single-link/' title='Damnation ISO (2009/ENG/GER/Repack) - 3.84 GB Single Link'><img alt='Damnation ISO ' height='148' src='http://i42.tinypic.com/2qxrw93.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/lost-season-5-all-episodes-single-links-watch-online/' title='Lost Season 5 All Episodes Single Links Watch Online'><img alt='Lost Season 5 All Episodes' height='148' src='http://i43.tinypic.com/153bl3c.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/green-street-hooligans-2-2009-700mb-single-link-9-hosts/' title='Green Street Hooligans 2 (2009)-700mb SINGLE LINK [9-HOSTS]'><img alt='Green Street Hooligans 2' height='148' src='http://i41.tinypic.com/2gt2id3.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/how-i-met-your-mother-all-seasons-1-2-3-4-all-episodes-single-link/' title='How I Met Your Mother All Seasons 1-2-3-4 | All Episodes | Single Link'><img alt='How I Met Your Mother All Seasons' height='148' src='http://i39.tinypic.com/96jn02.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/90-rihanna-hd-wallpapers/' title='90 Rihanna HD Wallpapers'><img alt='Rihanna HD Wallpapers' height='148' src='http://i41.tinypic.com/wbpg14.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/internet-download-manager-v517-build-4-full-may-19/' title='Internet Download Manager v5.17 Build 4 FULL [May-19]'><img alt='Internet Download Manager v5.17 Build 4' height='148' src='http://i44.tinypic.com/331oq5u.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/kaspersky-kiskav-2009-ultimate-key-collection-260509/' title='Kaspersky KIS/KAV 2009 Ultimate Key Collection - [26.05.09]'><img alt='Kaspersky' height='148' src='http://i44.tinypic.com/2wbxnut.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/alexander-rybak-fairytale-eurovision-2009-winner/' title='Alexander Rybak - Fairytale (Eurovision 2009 winner)'><img alt='Alexander Rybak - Fairytale' height='148' src='http://i42.tinypic.com/nf2lgm.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/ms-mf-mu-rscom-mount-blade-1011-mods/' title='Mount and Blade 1.011 + Mods'><img alt='Mount and Blade 1.011' height='148' src='http://i42.tinypic.com/2j2g7dt.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/terminator-salvation-rip25-gbworking/' title='Terminator Salvation [RIP][2.5 GB][Working]'><img alt='Terminator Salvation [RIP]' height='148' src='http://i40.tinypic.com/im1pwh.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/folio-blogger-themeforestnet/' title='Folio Blogger - Themeforest.net'><img alt='Folio Blogger' height='148' src='http://i40.tinypic.com/293vukm.jpg' width='100'/> </a> </div> <div class='panel'> <a href='http://www.torfil.com/linkin-park-new-divide-rapidshare-mediafire-megaupload/' title='Linkin Park - New Divide RapidShare MediaFire MegaUpload'><img alt='Linkin Park - New Divide' height='148' src='http://i42.tinypic.com/141v0i8.jpg' width='100'/> </a> </div>
</div> </div> </div> <!-- /Myslides --> </div><!-- /Toolbar -->
Pls fix I didnt find anywhere 
|
|
|
|
05-27-2009, 01:57 PM
|
Re: My index.php The W3C validators problems
|
Posts: 4
|
Code:
<style type="text/css">
You must place css stylesheets in the head section of the html page. You have it in the body. If you move the whole stylesheet to the head just like the validation error states, there shouldn't be any problems. 
|
|
|
|
|
« Reply to My index.php The W3C validators problems
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|