• 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

    • Codec Tweak Tool 6.7.7 by Razvan Serea This tool is a Swiss army knife for managing codecs and codec settings. Codec Tweak Tool will scan for broken filters and remove them. If the tool detects something that is broken, it will then prompt you with the details and you will be given the option to remove the broken item. Generate a detailed log of all installed codecs and filters, enable/disable more than 250 popular codecs and filters (if they are installed), manage preferred source filters, and reset settings. With this tool you can do things like: Scan the registry to detect and remove broken references to codecs and filters. Enable/disable more than 200 popular codecs and filters (if they are installed). Manage preferred source filters (a.k.a. splitters). Detect broken codecs and DirectShow filters. Fix problems with the standard DirectShow filters of Windows. A fix for a specific sound problem. Generate a text file with detailed information about all installed codecs and DirectShow filters, along with other relevant system information. Reset settings to recommended values for many popular codecs and DirectShow filters. Configure audio output settings for several popular audio decoders. Several configuration options for a few DirectShow filters that don't have an easily accessible interface for those options. Easy access to the configuration interfaces of various codecs and DirectShow filters Backup the settings of several codecs and DirectShow filters. Replace your current settings with those from a previous backup. Manage DirectShow filters - Enable or disable DirectShow filters. Manage ACM/VFW codecs - Enable or disable ACM/VFW codecs. Enable or disable DirectX Media Objects. Configure your preferred DirectShow source filters (a.k.a. splitters) for several common file extensions. Enable or disable the generation of thumbnails for several common video file formats in Windows Explorer. Download: Codec Tweak Tool 6.7.7 | 1.5 MB (Freeware) View: Codec Tweak Tool Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • The site is pretty sparse on features / tech specs. Can I plug it into a PC/hone/Switch via USB-C and use it as an external display? If so, what's the virtual resolution of the screen, the refresh rate, PPI of the image etc? Is the text crisp enough to use for coding at say 12pt? Is it good enough for playing dark games, like say Path of Exile 2? How about fast games like car racing games? Just how do they expect anyone to order this thing without giving out all this info?
    • I call complete bs on this - no way your average joe / jane is using AI.
  • 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
      544
    2. 2
      +Edouard
      159
    3. 3
      PsYcHoKiLLa
      86
    4. 4
      neufuse
      65
    5. 5
      Steven P.
      65
  • Tell a friend

    Love Neowin? Tell a friend!