• 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

    • lots of people us facebook for stuff, threads though no
    • Can you read? I've said I'm willing to pay more for a notchless (no notch) 3:2 screen.
    • Not even an OLED display on the laptops. Also it seems that the laptop design isn't the same as the Surface Ultra model. Looks like bargain bin at high prices.
    • make your own notch - it's not that hard
    • VirtualBox 7.2.10 by Razvan Serea VirtualBox is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also Open Source Software. Presently, VirtualBox runs on Windows, Linux, macOS, and Solaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, 7, 8, Windows 10 and Windows 11), DOS/Windows 3.x, Linux (2.4, 2.6, 3.x, 4.x, 5.x and 6.x), Solaris and OpenSolaris, OS/2, OpenBSD, NetBSD and FreeBSD. Some of the features of VirtualBox are: Modularity. VirtualBox has an extremely modular design with well-defined internal programming interfaces and a client/server design. This makes it easy to control it from several interfaces at once: for example, you can start a virtual machine in a typical virtual machine GUI and then control that machine from the command line, or possibly remotely. VirtualBox also comes with a full Software Development Kit: even though it is Open Source Software, you don't have to hack the source to write a new interface for VirtualBox. Virtual machine descriptions in XML. The configuration settings of virtual machines are stored entirely in XML and are independent of the local machines. Virtual machine definitions can therefore easily be ported to other computers. VirtualBox 7.2.10 changelog: VMM: Fixed issue when CentOS 10 VM was not booting due to the message "Fatal glibc error: CPU does not support x86-64-v3" (​github:gh-642) Devices/EFI: Fixed booting issue when ARM VM had less than 1024 MiB of RAM assigned (​github:gh-679) USB: Fixed issue when it was not possible to attach USB device to headless VM on Apple Silicon/macOS 26.4.1 (​github:gh-631) Storage: Fixed issue when VIRTIO-SCSI device was not recognized as SSD device by guest system (​github:gh-634) Network: Fixed issue in E1000 emulation code which triggered debug log creation (​github:gh-645) Network: Fixed issue in E1000 emulation code which prevented OS/2 guest from booting (​github:gh-683) Linux Host: Fixed issue when VMs could not be started due to kernel oops (​github:gh-639) Linux Host and Guest: Fixed issue when kernel modules were failing to build with openSUSE 16.0 kernel Linux Host and Guest: Added initial support for kernel 7.1 Linux Host and Guest: Added extra fixes for RHEL 9.8 kernel (​github:gh-676) Linux Host and Guest: Added possibility to build source code using NASM instead of YASM as the assembler (​github:gh-520) Linux Guest Additions: Added initial support for Extended Data Control Protocol for clipboard sharing with Plasma on Wayland guests (​github:gh-33) Linux Guest Additions: Added extra fixes for preventing vboxvideo kernel module build with kernel version 7.0 and newer (​github:gh-655) OS/2 Guest Additions: Fixed issue when Shared Folders automount and clipboard sharing stopped working (​github:gh-551) Download: VirtualBox 7.2.10 | 170.0 MB (Open Source) Download: VirtualBox 7.2.10 Extension Pack | 19.1 MB View: VirtualBox Home Page | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • 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
    • Week One Done
      Prasann earned a badge
      Week One Done
    • First Post
      Dys Topia earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      510
    2. 2
      +Edouard
      174
    3. 3
      PsYcHoKiLLa
      100
    4. 4
      Steven P.
      87
    5. 5
      ATLien_0
      70
  • Tell a friend

    Love Neowin? Tell a friend!