• 0

CSS Image Rollover


Question

Hello, I have a 'submit' button on one of my forms, and I've used a style, to stylize the button, as expected works fine in everything but IE.

IE seems to require an <a href=""></a> link in order for it to used my css rollover image.

So basically, I have a button, that when I hover over it, the original image changes into something else, and this refuses to work in IE, does anyone know a work around?

<input type="submit" class="go1" name="submit" value="Send" id="submit" />

It needs to go in there somewhere, I tried tricking IE, by putting in <a class="go1"></a> but it didn't like it :(

Link to comment
https://www.neowin.net/forum/topic/637938-css-image-rollover/
Share on other sites

20 answers to this question

Recommended Posts

  • 0

^ pity it doesn't render properly cross-browser for all content (see the comments for the liked article). Therefore you may as well stick with a <input type="submit"/> and include the IE6 behaviour...

or you could use <input type="image"/> (which is also a submit) and use the supported-by-all mouseover/out/down etc. events to alter the "look" (hint: the src attribute).

  • 0
Wow, IE never fails to surprise me about just how bad it is... Do what I do and just selectively turn CSS off for IE. Your site should render fine without CSS (if it is coded well), and if they want CSS, they need a CSS capable browser.

yes, I wonder how soon it can be before we can stop designing websites with IE6 in mind, and stop using hacks to get results that will work across all browsers, its not like people have to pay to upgrade, Safari, Opera, IE7 and FF are all free of charge.

Pity not everyones just uses safari, I hear it can accept multiple background images :-)

  • 0
Wow, IE never fails to surprise me about just how bad it is... Do what I do and just selectively turn CSS off for IE. Your site should render fine without CSS (if it is coded well), and if they want CSS, they need a CSS capable browser.

forget about CSS, MSIE doesn't even render XHTML.

  • 0
forget about CSS, MSIE doesn't even render XHTML.

Well of course it doesn't... CSS is more important than XHTML, though. CSS should be used for HTML4 and XHTML. What I do find amusing is that IE8 is going to implement Microformats before it can even do CSS and XHTML!

On the other hand in the good browser category we can already embed arbitrary XML namespaces into XHTML pages ie. SVG in XHTML to enable scalable vector graphics on a web page. We can embed MathML in to pages to display Maths instead of using user unfriendly (and unsemantic) raster graphics to display them.

Here is quite an interesting page: http://intertwingly.net/blog/ Note the SVG icons. With Firefox if you hold control and move your scroll wheel you can adjust the font size. Note how the icons scale perfectly with the rest of the content the way you would expect. For visually impaired users this is great. IE is also holding back the accessible web.

  • 0
Well of course it doesn't... CSS is more important than XHTML, though. CSS should be used for HTML4 and XHTML. What I do find amusing is that IE8 is going to implement Microformats before it can even do CSS and XHTML!

On the other hand in the good browser category we can already embed arbitrary XML namespaces into XHTML pages ie. SVG in XHTML to enable scalable vector graphics on a web page. We can embed MathML in to pages to display Maths instead of using user unfriendly (and unsemantic) raster graphics to display them.

Here is quite an interesting page: http://intertwingly.net/blog/ Note the SVG icons. With Firefox if you hold control and move your scroll wheel you can adjust the font size. Note how the icons scale perfectly with the rest of the content the way you would expect. For visually impaired users this is great. IE is also holding back the accessible web.

mmm, i'd say the content is more important than the style, but then again you make a good point that CSS could be used with HTML as well...

  • 0

It should be used with HTML4. HTML4 has the same content/presentation separation recommendation as XHTML. XHTML is basically HTML4 in XML form, the CSS guidelines have not changed. HTML4 is still a valid thing to use on the web considering IE doesn't support XHTML but since it doesn't support CSS either, what's the point?

SVG and MathML can be embedded in XHTML (there's a special XHTML Doctype with those modules included)

And Sam Ruby's page is "XHTML5"

Yeah it is XHTML5 but it's not a standard yet which is why it uses the generic html doctype probably to make sure Firefox etc. stays in standards compliant mode. But it is served with the application/xhtml+xml MIME type which XHTML should be served as. IE does not support this MIME type (and thus does not support XHTML) but it is required for embedding other namespaces. You do not have to use a special XHTML dtd to embed any other XML namespace, by the way.

  • 0
It should be used with HTML4. HTML4 has the same content/presentation separation recommendation as XHTML. XHTML is basically HTML4 in XML form, the CSS guidelines have not changed. HTML4 is still a valid thing to use on the web considering IE doesn't support XHTML but since it doesn't support CSS either, what's the point?

Yeah it is XHTML5 but it's not a standard yet which is why it uses the generic html doctype probably to make sure Firefox etc. stays in standards compliant mode. But it is served with the application/xhtml+xml MIME type which XHTML should be served as. IE does not support this MIME type (and thus does not support XHTML) but it is required for embedding other namespaces. You do not have to use a special XHTML dtd to embed any other XML namespace, by the way.

IE8 makes a lot of improvements in the CSS department though. What's stupid is that it could probably even render XHTML markup properly, but because it still doesn't support the mime type, is just as useless as IE7.

  • 0

I'll believe that when I see it. IE7 was supposed to have a lot of improvements but it's still a complete joke. Microsoft will only implement stuff in IE that benefits them. They don't care about the community. They only made IE7 because Firefox was getting features that normal people like like RSS.

If everyone started turning CSS off for IE (and any browser that doesn't support it) then we would be fine. But unfortunately most people are controlled my Microsoft in ways they wouldn't even think of. If Microsoft chooses not to support a certain part of CSS then why should I be forced to not use it when every CSS capable browser supports it?

  • 0
...

Yeah it is XHTML5 but it's not a standard yet which is why it uses the generic html doctype probably to make sure Firefox etc. stays in standards compliant mode. But it is served with the application/xhtml+xml MIME type which XHTML should be served as. IE does not support this MIME type (and thus does not support XHTML) but it is required for embedding other namespaces. You do not have to use a special XHTML dtd to embed any other XML namespace, by the way.

"<!DOCTYPE html>" isn't a generic Doctype, it's the HTML5 doctype.

And it's not XHTML 1.0, 1.1 or 2, if you try to validate the page (using the W3C validator) you'll get hundreds of "errors".

doctypes aren't really needed though, and can lead to other issues (if you're embedding SVG in XHTML, even with the XML namespace the doctype says you need to prefix SVG elements, i.e. <svg:svg>)

That and people don't seem to like XHTML (no browsers do validity checks (hence why inline SVG without the doctype's fine), the XML parsers used just make sure the page is well formed, well formed tag soup is still tag soup).

  • 0
"<!DOCTYPE html>" isn't a generic Doctype, it's the HTML5 doctype.

But it isn't supported yet as there isn't strictly any such thing as HTML 5. Yet. Which is why the Fx HTML Validator extension coughs and wheezes over it. It does do validity as well as well-formed checks but only for the DTDs it knows (and were presumably referenced by the doctype declaration).

Distler's blog is a good example of XHTML+MathML+SVG.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Epic Games says Unreal Engine 6 will help developers "build content faster" using AI models by Pulasthi Ariyasinghe Epic Games is rolling out the latest major update to Unreal Engine 5 today, and at the same time, the company also dropped some information on the next-generation version of the product, Unreal Engine 6. This was already revealed a few weeks ago alongside the new Rocket League upgrade reveal. The company says it is combining the features of Unreal Engine and Unreal Editor for Fortnite to create this new version of its popular media creation tool. On top of creating entire games, the new engine will also focus on letting developers operate large-scale live service titles more easily, whether by shipping content into their own ecosystems or into Fortnite. The use of large language models is also mentioned here, with Epic saying it will be a core part of the engine. "We see LLMs, generative AI models, and tools like Claude and Codex playing a central role in helping you build content faster while maintaining the creative control you need," adds the company. Here is the rundown of what's new about version 6 of Unreal Engine: With all these changes to the programming model, portability upgrades, and generative AI integration, Epic says the new version of the engine will "change a lot about how games are made." The company aims to ship Unreal Engine 6 into early access in late 2027, with a full release planned for 12-18 months later. Epic Games also dropped a lengthy blog post about the new Unreal Engine 5.8 update for game developers over here. The release is focused on delivering better performance, customization, and streamlined workflows for development teams. This will be the final major update for this version of the engine before Epic switches to focus fully on Unreal Engine 6's early access launch.
    • Watch Louis Rossmann's recent experience on YouTube about trying to get a warranty replacement from Samsung. It's crazy.
    • That is the thing, how many of these people don't realise they are using AI? If they use Google Search they have no choice but to use AI. So yes, maybe half of American adults do use and I expect a lot of Uk adults do to, but I bet most of them don't realise it. Myself, i avoid the rubbish.
    • They use FREE AI. They aren't paying for this meme-generating slopware...
    • Gotta' buy that there Rufus guy a beer if I ever meet him. He makes good stuff.
  • Recent Achievements

    • One Month Later
      Vincian earned a badge
      One Month Later
    • First Post
      Jocimo earned a badge
      First Post
    • Week One Done
      suprememobiles48 earned a badge
      Week One Done
    • One Month Later
      Windows Guy earned a badge
      One Month Later
    • One Month Later
      Prasann earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      499
    2. 2
      +Edouard
      165
    3. 3
      PsYcHoKiLLa
      89
    4. 4
      Steven P.
      69
    5. 5
      neufuse
      65
  • Tell a friend

    Love Neowin? Tell a friend!