...

View Full Version : validation errors with commented sections - IF IE7



jarv
06-11-2012, 12:08 PM
Please help, I am having validation issues with my code checking for which browser is being used.

see my errors here: http://validator.w3.org/check?uri=http%3A%2F%2Fapl.inpreview.net%2F&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.3




<!--[if lt IE 7]>
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/library/scripts/unitpngfix.js"></script>
<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/library/styles/hacks/ieonly.css" />
<![endif]-->

<!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/library/styles/hacks/ie6.css" /><![endif]-->
<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/library/styles/hacks/ie7.css" /><![endif]-->
<!--[if lte IE 8]><link rel="stylesheet" type="text/css" href="<?php bloginfo('template_directory'); ?>/library/styles/hacks/ie8.css" /><![endif]-->

SB65
06-11-2012, 01:23 PM
If you view the source of your page you'll see that the validation errors are not coming from the code you've posted above. Have a look at the identified lines from the validator and you'll see the error.

Major Payne
06-12-2012, 09:47 AM
Those comment tags are not allowed inside the style tags. Use: /* comment here */ . Better to just remove them.



<!--[if lte IE 8]>
<style type="text/css">
#content { padding-top: 182px !important; }
</style>
<![endif]-->

jarv
06-12-2012, 04:45 PM
ah yes, thanks, my content still moves up by about 2px when you click on HOME - to keep on testing this click the logo and then click HOME

http://apl.inpreview.net/

Major Payne
06-12-2012, 07:02 PM
For XHTML 1.o doctype, you still have some warnings:


line 191 column 1 - Warning: <table> lacks "summary" attribute
line 201 column 1 - Warning: <table> lacks "summary" attribute
line 210 column 1 - Warning: <table> lacks "summary" attribute
line 98 column 1 - Warning: trimming empty <style>

Check your CSS errors (http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Fapl.inpreview.net%2F). Ignore any properly coded CSS 3 rules.

Your HOME link is http://apl.inpreview.net/#home When using named anchors, you need to pay attention to placement on your page. This would go for the others, but they seem to roll into view and it's hard to tell if there is a 2 pixel shift up before doing so. You have a CSS reset and I guess it is coming first in line and resets all the margins, paddings and borders.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum