making this code valid...

admin

Administrator
Staff member
Hey all<br /><br />I'm adapting a gallery by Stu Nichols - <b>found here</b> but after doing all the work have discovered that the code doesn't validate. I have the following within my <head> tag<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><head><br /><br /><link href=http://www.webdesignerforum.co.uk/lofiversion/index.php/"css_pictures.css" rel="stylesheet" type="text/css" /><br /><link rel="stylesheet" media="all" type="text/css" href=http://www.webdesignerforum.co.uk/lofiversion/index.php/"simple_css/simple.css" /><br /><br /><!--[if IE]><br /><link rel="stylesheet" media="all" type="text/css" href=http://www.webdesignerforum.co.uk/lofiversion/index.php/"simple_css/simple_ie.css" /><br /><![endif]--><br /><br /><script src=http://www.webdesignerforum.co.uk/lofiversion/index.php/"simple_js/simple.js" type="text/javascript"></script><br /><noscript><br /><link rel="stylesheet" media="all" type="text/css" href=http://www.webdesignerforum.co.uk/lofiversion/index.php/"simple_css/simple_noscript.css" /><br /><link rel="stylesheet" media="all" type="text/css" href=http://www.webdesignerforum.co.uk/lofiversion/index.php/"simple_css/simple_ie_noscript.css" /><br /></noscript><br /><br /></head><!--c2--></div><!--ec2--><br /><br />and it's the noscript stuff that causes the problem. How can I get this to validate?<br /><br />Link to my version here<!--content-->
Hm... NOSCRIPT not allowed in the HEAD... wonder why that is. I'd be tempted here to ignore the validation. It just seem sensible to me that NOSCRIPT should be allowed in the HEAD.<br /><br />Validation isn't alpha and omega. If you got a good reason to break it then break it.<br /><br />I just presently discovered that wrapping INS or DEL around a LI element doesn't validate. Which to me makes no sense. If a list item is removed then I want to indicate that the whole LI element is gone, not just the content. If I place the INS or DEL inside the LI elements the bullets are still visible. I think it's><img src='http://www.webdesignerforum.co.uk/style_images/1/post_snapback.gif' alt='*' border='0' /></div><div class='quotemain'><!--quotec-->i agree with TT here, but if you MUST have the code validate, then you need to think in reverse.<br /><br />Instead of doing a "noscript" you need to do a "script". The script will import the stylesheets into the document onload, and these stylesheets will overwrite the always-defined noscript CSS files.<br /><br />Not sure how to achieve this off the top of my head, but it is the best way IMO.<!--QuoteEnd--></div><!--QuoteEEnd--><br /><br />I was thinking the same. Reversing the thinking. But As you say, how can you easily override whole sets of stylesheets? I wasn't sure myself. ... I wonder... what would happend if the script onDOMready removes the LINK elements to the stylesheets? ... will the browser then unload those styles again?<!--content-->
Eskymo, could you explain what you're trying to achieve? It could be that you don't need to import extra stylesheets...?<!--content-->
well it took me ages to find a css based thubmnail gallery that worked the way I wanted it to and that worked OK on a mac as weel - this involved using javascript...so I wanted to make sure that the gallery would still work if javascript was deisabled, so that's why I chose this one as it offers an 'noscript' option in that you can just rollover the thumbnails and still see the larger image. If there's a way of just getting rid of tha javascript and not having to bother with it, then I think I'll do that.<br /><br />Thanks<!--content-->
I had a look at the site with JS disabled. What if you made the image change with :focus instead of :hover? I think it'd behave much like the JS version then. But it depends on how much backwards compatibility you require.<!--content-->
 
Top