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 5 of 5
  1. #1
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts

    validation errors with commented sections - IF IE7

    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=ht...alidator%2F1.3


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

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,956
    Thanks
    9
    Thanked 727 Times in 721 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    836
    Thanks
    10
    Thanked 79 Times in 77 Posts
    Those comment tags are not allowed inside the style tags. Use: /* comment here */ . Better to just remove them.

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

  • #4
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts
    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/

  • #5
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    836
    Thanks
    10
    Thanked 79 Times in 77 Posts
    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. 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.
    Last edited by Major Payne; 06-12-2012 at 07:05 PM.
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

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