I'm unfortunately not talking about my IE issues solved, I'm talking about my JavaScript issues sorted - for now.
I checked out Alastair's suggestion re the CDATA 'hiding'/identifying code solution, but it wasn't the fix I was after. You see, I was trying to implement JS animation to trigger a mouseover jpg change for each of my navigation buttons. The problem with that was, the formula required me to use the name attribute to identify my images, and link them to the JS i needed to make this happen. The name attribute is fine - so long as you're using HTML 4.01 or XHTML transitional. Because I like a challenge, I planned to write my site in strict XHTML. I worked x-hard to make this so, and everything was wonderful and fine and valid, right up until now. I was weighing up the pros/cons re caving in on my principles and having the JS I wanted or sticking to my guns. As it turns out, I could do both!
I found one fix that sugested substituting 'id' for 'name'. It seemed to work (although who knows re IE). I then realised i had only found the code to make it work for one button on a page, no a whole navigation row. I tried to play with the code to make it work (and had a range of results from none working, to all changing when the mouse was anywhere near any button, to only one button changing no matter which button you hovered over). I decided to pass the question on to my brains trust (aka Google) and discovered some interesting information (http://www.programmingtalk.com/showthread.php?p=147625). I didn't even have to set the JS i the code - in fact I could ditch the start section altogether, as well as the id and name attributes! Just some simple inline script for each button. Voila! All functioning beautifully, fully compliant with W3c's strict XHTML and CSS rules! Yay!
Re the IE problem, Tim and I but borders around all of my divs at the end of class, and the page is looking a little less roomy.... I suspect IE is adding some padding somewhere (cheeky mongrels, as my mum likes to say), which is what is pushing the middle div down the page. As to why it's not reading my 'text decoration: none' request, it's anyones guess. But that's going to have to be one for another day. I don't have IE here at home and tomorrow I have a lot of Interaction Design work to catch up on!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment