Jump to content

Javascript Over Css In Css Guide?!


Daniel-Dane
 Share

Recommended Posts

:hover on elements that are not <a> elements doesn't work on IE6 at all (I think) and only works on IE7 with a strict doctype. A lot of new designers don't use any doctype or use a transitional doctype. This way they can see the effect no matter what.That said, showing both options might be a good idea.

Link to comment
Share on other sites

The reason they use Javascript instead of CSS is because their examples don't have a Doctype declaration, therefore :hover wouldn't work in Internet Explorer 7.I don't develop for Internet Explorer 6, but it's wise to continue developing for Internet Explorer 7. It's just fine to use the :hover pseudo-class but you must make sure you're using a Strict DTD to make it work in Internet Explorer 7.

Link to comment
Share on other sites

Then add a doctype.
The tryit editors use the <iframe> element. The <iframe> element isn't part of the HTML or XHTML Strict DTDs, they have to use Transitional.
Link to comment
Share on other sites

It's easy to say don't use ie6, but many people are still using it. It really depends on your audience. Let's face it if you are a commercial developer you need to be aware of the large portion of users who still use ie6.Many businesses lock down the admin rights on their networks, meaning individuals cannot upgrade to the latest browser and the company does not want to spend the resources on upgrading every computer. So even if the end customer is able to use FF 3, internally, the departments testing the sites are using older browsers and don't particularly care that it looks perfect in FF 3 because they can't click on any of the anchors or the text is flying off the side of the window.Developers can be very arrogant, if you are hired to do a job, whatever that job is, you must do it as well as you can, even if that means lowering your standards to supporting...dare I say...IE6In a perfect world we'd all be using attribute selectors and pseudo classes on the body tag, but it ain't so deal with it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...