css - onmouseover

Discussion in 'HTML' started by Jan C. Faerber, Oct 23, 2009.

  1. is there a way to have an onmouseover effect with css without JS?
    this could be just a simple way to change the colour of a <div>
    section.
    don't mean the traditional way to have another pic.
    just the colour or another effect coming when moving the mouse over an
    area.
     
    Jan C. Faerber, Oct 23, 2009
    #1
    1. Advertising

  2. Jan C. Faerber

    Doug Miller Guest

    In article <>, "Jan C. Faerber" <> wrote:
    >is there a way to have an onmouseover effect with css without JS?
    >this could be just a simple way to change the colour of a <div>
    >section.
    >don't mean the traditional way to have another pic.
    >just the colour or another effect coming when moving the mouse over an
    >area.


    The :hover pseudo-class is probably what you're looking for.
     
    Doug Miller, Oct 23, 2009
    #2
    1. Advertising

  3. Jan C. Faerber

    C A Upsdell Guest

    Doug Miller wrote:
    > In article <>, "Jan C. Faerber" <> wrote:
    >> is there a way to have an onmouseover effect with css without JS?
    >> this could be just a simple way to change the colour of a <div>
    >> section.
    >> don't mean the traditional way to have another pic.
    >> just the colour or another effect coming when moving the mouse over an
    >> area.

    >
    > The :hover pseudo-class is probably what you're looking for.


    But note that IE 5 and 6 honour :hover only on links.
     
    C A Upsdell, Oct 23, 2009
    #3
  4. Jan C. Faerber

    Doug Miller Guest

    In article <hbt4m2$co$-september.org>, C A Upsdell <> wrote:
    >Doug Miller wrote:
    >> In article

    > <>, "Jan C.
    > Faerber" <> wrote:
    >>> is there a way to have an onmouseover effect with css without JS?
    >>> this could be just a simple way to change the colour of a <div>
    >>> section.
    >>> don't mean the traditional way to have another pic.
    >>> just the colour or another effect coming when moving the mouse over an
    >>> area.

    >>
    >> The :hover pseudo-class is probably what you're looking for.

    >
    >But note that IE 5 and 6 honour :hover only on links.
    >

    How much longer will web developers continue to think that they must support
    these abominations? IE5 now has less than 1% of the browser market; there
    simply is no reason at all to consider supporting IE5 in a general-purpose web
    application. As for IE6, consider this article:
    http://robertnyman.com/2009/02/09/stop-developing-for-internet-explorer-6/
     
    Doug Miller, Oct 24, 2009
    #4
  5. Jan C. Faerber

    dorayme Guest

    In article <hbtdm1$8tb$-september.org>,
    (Doug Miller) wrote:

    > How much longer will web developers continue to think that they must support
    > these abominations? IE5 now has less than 1% of the browser market; there
    > simply is no reason at all to consider supporting IE5 in a general-purpose
    > web
    > application. As for IE6, consider this article:
    > http://robertnyman.com/2009/02/09/stop-developing-for-internet-explorer-6/


    In that article:

    "Internet Explorer 6 still has somewhere between 20 ­ 34% of the web
    browser market"

    and

    "I currently or previously have worked with, or friends I know in the
    business, we spend about an extra, on average, 20% of development time
    to cater to Internet Explorer 6."

    There is an obvious counter argument that draws a different conclusion
    from these two premises. Can you guess what it is?

    --
    dorayme
     
    dorayme, Oct 24, 2009
    #5
  6. Jan C. Faerber

    Doug Miller Guest

    In article <>, dorayme <> wrote:
    >In article <hbtdm1$8tb$-september.org>,
    > (Doug Miller) wrote:
    >
    >> How much longer will web developers continue to think that they must support
    >> these abominations? IE5 now has less than 1% of the browser market; there
    >> simply is no reason at all to consider supporting IE5 in a general-purpose
    >> web
    >> application. As for IE6, consider this article:
    >> http://robertnyman.com/2009/02/09/stop-developing-for-internet-explorer-6/

    >
    >In that article:
    >
    >"Internet Explorer 6 still has somewhere between 20 ­ 34% of the web
    >browser market"


    But declining by the minute...
    >
    >and
    >
    >"I currently or previously have worked with, or friends I know in the
    >business, we spend about an extra, on average, 20% of development time
    >to cater to Internet Explorer 6."
    >
    >There is an obvious counter argument that draws a different conclusion
    >from these two premises. Can you guess what it is?
    >

    Sorry, it's not at all obvious.
     
    Doug Miller, Oct 24, 2009
    #6
  7. Jan C. Faerber

    C A Upsdell Guest

    Doug Miller wrote:
    >>> How much longer will web developers continue to think that they must support
    >>> these abominations? IE5 now has less than 1% of the browser market; there
    >>> simply is no reason at all to consider supporting IE5 in a general-purpose
    >>> web
    >>> application. As for IE6, consider this article:

    >>
    >> "I currently or previously have worked with, or friends I know in the
    >> business, we spend about an extra, on average, 20% of development time
    >> to cater to Internet Explorer 6."
    >>
    >> There is an obvious counter argument that draws a different conclusion
    >>from these two premises. Can you guess what it is?


    > Sorry, it's not at all obvious.


    Sigh. A hint: you should not be making websites for browsers; you
    should be making websites for the sites' visitors.

    Now can you guess?
     
    C A Upsdell, Oct 24, 2009
    #7
  8. Jan C. Faerber

    dorayme Guest

    In article <hbtjf2$rhv$-september.org>,
    (Doug Miller) wrote:

    > In article <>, dorayme
    > <> wrote:
    > >In article <hbtdm1$8tb$-september.org>,
    > > (Doug Miller) wrote:
    > >
    > >> How much longer will web developers continue to think that they must
    > >> support
    > >> these abominations? IE5 now has less than 1% of the browser market; there
    > >> simply is no reason at all to consider supporting IE5 in a general-purpose
    > >> web
    > >> application. As for IE6, consider this article:
    > >> http://robertnyman.com/2009/02/09/stop-developing-for-internet-explorer-6/

    > >
    > >In that article:
    > >
    > >"Internet Explorer 6 still has somewhere between 20 ­ 34% of the web
    > >browser market"

    >
    > But declining by the minute...
    > >
    > >and
    > >
    > >"I currently or previously have worked with, or friends I know in the
    > >business, we spend about an extra, on average, 20% of development time
    > >to cater to Internet Explorer 6."
    > >
    > >There is an obvious counter argument that draws a different conclusion
    > >from these two premises. Can you guess what it is?
    > >

    > Sorry, it's not at all obvious.


    OK. It is declining by the minute. But it is still *over* 20% for now.
    Right? So, the conclusion that some people might think rather obvious is
    that this justifies spending up to 20% of the budget on the existing
    audience. It is not a simple matter and this policy needs to be examined
    carefully on a website by website basis.

    I agree that if the rate of fall is *very rapid*, then it does become
    questionable whether such an investment is worthwhile. It all depends on
    what the site is and the marketing strategy (if this applies).

    For example, if someone is launching a product with the aim of getting
    results in a week or two, then it must be calculated whether possibly
    losing over 20% of custom is worth it. If it is a site that has a
    considerable long term aim, then maybe the downward trend needs to be
    taken into account when deciding whether it is worth spending money
    supporting what is becoming obsolete.

    It seemed simply obvious to me that this is a not a black and white
    affair and there are trade offs. Not that anyone seemed to understand
    any of this in that URL or in the remarkably sycophantic and naive
    follow up comments there.

    --
    dorayme
     
    dorayme, Oct 24, 2009
    #8
  9. Jan C. Faerber

    Doug Miller Guest

    In article <hbtjnq$ugo$-september.org>, C A Upsdell <> wrote:
    >Doug Miller wrote:
    >>>> How much longer will web developers continue to think that they must

    > support
    >>>> these abominations? IE5 now has less than 1% of the browser market; there
    >>>> simply is no reason at all to consider supporting IE5 in a general-purpose
    >>>> web
    >>>> application. As for IE6, consider this article:
    >>>
    >>> "I currently or previously have worked with, or friends I know in the
    >>> business, we spend about an extra, on average, 20% of development time
    >>> to cater to Internet Explorer 6."
    >>>
    >>> There is an obvious counter argument that draws a different conclusion
    >>>from these two premises. Can you guess what it is?

    >
    >> Sorry, it's not at all obvious.

    >
    >Sigh. A hint: you should not be making websites for browsers; you
    >should be making websites for the sites' visitors.
    >
    >Now can you guess?
    >

    I think you're missing the point. Yes, obviously one should be making websites
    for the site's visitors -- and *not* for the broken browsers that some of them
    might happen to be using.
     
    Doug Miller, Oct 24, 2009
    #9
  10. Jan C. Faerber

    dorayme Guest

    In article <hbtvhc$amm$-september.org>,
    (Doug Miller) wrote:

    > In article <hbtjnq$ugo$-september.org>, C A Upsdell
    > <> wrote:
    > >Doug Miller wrote:
    > >>>> How much longer will web developers continue to think that they must

    > > support
    > >>>> these abominations? IE5 now has less than 1% of the browser market;
    > >>>> there
    > >>>> simply is no reason at all to consider supporting IE5 in a
    > >>>> general-purpose
    > >>>> web
    > >>>> application. As for IE6, consider this article:
    > >>>
    > >>> "I currently or previously have worked with, or friends I know in the
    > >>> business, we spend about an extra, on average, 20% of development time
    > >>> to cater to Internet Explorer 6."
    > >>>
    > >>> There is an obvious counter argument that draws a different conclusion
    > >>>from these two premises. Can you guess what it is?

    > >
    > >> Sorry, it's not at all obvious.

    > >
    > >Sigh. A hint: you should not be making websites for browsers; you
    > >should be making websites for the sites' visitors.
    > >
    > >Now can you guess?
    > >

    > I think you're missing the point. Yes, obviously one should be making
    > websites
    > for the site's visitors -- and *not* for the broken browsers that some of
    > them
    > might happen to be using.


    No, I don't think Upsdell is missing the point really, the devil of this
    is in the details of the connection between the audience and the
    browsers. I have explained this a bit more in a reply to you earlier.
    The bottom line is if it is a matter of money, then it may well be worth
    it to spend 20% extra to avoid losing up to 34% of the audience. It
    depends. I am not saying that there might not be a longer term interest
    for us all in making life less comfortable for IE6 users. But there are
    some short term obligations in this area.

    It would be fascinating to see what sort of websites require such a big
    effort for IE6 alone (remember there is IE7 and 8, how great are these
    browsers in the standards-expected-behaviour stakes?).

    --
    dorayme
     
    dorayme, Oct 24, 2009
    #10
  11. Jan C. Faerber

    Peter Guest

    In article <>,
    says...
    > In article <hbtjf2$rhv$-september.org>,
    > (Doug Miller) wrote:
    >
    > > >> application. As for IE6, consider this article:
    > > >> http://robertnyman.com/2009/02/09/stop-developing-for-internet-explorer-6/
    > > >
    > > >In that article:
    > > >
    > > >"Internet Explorer 6 still has somewhere between 20 ­ 34% of the web
    > > >browser market"

    > >
    > > But declining by the minute...
    > > >
    > > >and
    > > >
    > > >"I currently or previously have worked with, or friends I know in the
    > > >business, we spend about an extra, on average, 20% of development time
    > > >to cater to Internet Explorer 6."
    > > >
    > > >There is an obvious counter argument that draws a different conclusion
    > > >from these two premises. Can you guess what it is?
    > > >

    > > Sorry, it's not at all obvious.

    >
    > OK. It is declining by the minute. But it is still *over* 20% for now.
    > Right? So, the conclusion that some people might think rather obvious is
    > that this justifies spending up to 20% of the budget on the existing
    > audience. It is not a simple matter and this policy needs to be examined
    > carefully on a website by website basis.
    >


    And if people stopped coding for IE6 then those who still use it would
    be forced to either upgrade or find an alternative, because there'd be
    too many broken web pages. Thus reducing that percentage even faster.
    Hehe. ;-)

    --
    Pete Ives
    Remove All_stRESS before sending me an email
     
    Peter, Oct 24, 2009
    #11
  12. Jan C. Faerber

    Peter Guest

    In article <>, says...
    > dorayme wrote:
    > > In article<hbtdm1$8tb$-september.org>,
    > > (Doug Miller) wrote:
    > >
    > >> How much longer will web developers continue to think that they must support
    > >> these abominations? IE5 now has less than 1% of the browser market; there
    > >> simply is no reason at all to consider supporting IE5 in a general-purpose
    > >> web
    > >> application. As for IE6, consider this article:
    > >> http://robertnyman.com/2009/02/09/stop-developing-for-internet-explorer-6/

    > >
    > > In that article:
    > >
    > > "Internet Explorer 6 still has somewhere between 20 ­ 34% of the web
    > > browser market"
    > >
    > > and
    > >
    > > "I currently or previously have worked with, or friends I know in the
    > > business, we spend about an extra, on average, 20% of development time
    > > to cater to Internet Explorer 6."
    > >
    > > There is an obvious counter argument that draws a different conclusion
    > > from these two premises. Can you guess what it is?
    > >

    >
    > One argument might be that the fewer Web sites that cater to IE "less
    > than version 7" the more incentive there will be for users to upgrade.
    >
    > In other words, to not mince words, nothing lasts forever, upgrade your
    > system, upgrade your OS, come join us in the 21st Century before it's over.
    >
    > Or not. but I'm not gonna worry about your broken browser much longer.
    > Harsh? Yep. Sorry about that.
    >
    >

    Damn, you beat me to it. :)
    --
    Pete Ives
    Remove All_stRESS before sending me an email
     
    Peter, Oct 24, 2009
    #12
  13. Jan C. Faerber

    Andy Dingley Guest

    On 24 Oct, 00:19, (Doug Miller) wrote:

    > How much longer will web developers continue to think that they must support
    > these abominations?


    IE6 has a large share of the Windows 2000 market, and is likely to
    continue to do so. It's around for as long as W2K is.
     
    Andy Dingley, Oct 24, 2009
    #13
  14. On Oct 23, 10:03 pm, (Doug Miller) wrote:
    > In article <..com>, "Jan C. Faerber" <> wrote:
    >
    > >is there a way to have an onmouseover effect with css without JS?
    > >this could be just a simple way to change the colour of a <div>
    > >section.
    > >don't mean the traditional way to have another pic.
    > >just the colour or another effect coming when moving the mouse over an
    > >area.

    >
    > The :hover pseudo-class is probably what you're looking for.


    Works fine - a made a test file: http://www.lovedieu.eu/alt.html/hover.html
    That seems to be a good way to forget about
    painting buttons for a menu.
    Does it come only with the <a> tag?
     
    Jan C. Faerber, Oct 24, 2009
    #14
  15. On Oct 24, 9:24 am, dorayme <> wrote:

    > It would be fascinating to see what sort of websites require such a big
    > effort for IE6 alone (remember there is IE7 and 8, how great are these
    > browsers in the standards-expected-behaviour stakes?).
    >
    > --
    > dorayme


    Virtual PC... /-: ?
    No chance to install all ies same time / machine. np
     
    Jan C. Faerber, Oct 24, 2009
    #15
  16. Jan C. Faerber

    Doug Miller Guest

    In article <>, dorayme <> wrote:

    >No, I don't think Upsdell is missing the point really, the devil of this
    >is in the details of the connection between the audience and the
    >browsers. I have explained this a bit more in a reply to you earlier.
    >The bottom line is if it is a matter of money, then it may well be worth
    >it to spend 20% extra to avoid losing up to 34% of the audience.


    Except that IE6 doesn't have anywhere near 34% of the market any more.

    > It
    >depends. I am not saying that there might not be a longer term interest
    >for us all in making life less comfortable for IE6 users. But there are
    >some short term obligations in this area.
    >
    >It would be fascinating to see what sort of websites require such a big
    >effort for IE6 alone (remember there is IE7 and 8, how great are these
    >browsers in the standards-expected-behaviour stakes?).


    IE7 and 8, however, do a *much* better job of implementing the standards than
    IE6, so there isn't nearly as much additional work required to be compatible
    with them.
     
    Doug Miller, Oct 24, 2009
    #16
  17. Jan C. Faerber

    Doug Miller Guest

    In article <>, Andy Dingley <> wrote:
    >On 24 Oct, 00:19, (Doug Miller) wrote:
    >
    >> How much longer will web developers continue to think that they must support
    >> these abominations?

    >
    >IE6 has a large share of the Windows 2000 market, and is likely to
    >continue to do so. It's around for as long as W2K is.


    General support for Win2K was "retired" on 30 Jun 2005, according to MS. Tell
    me again why developers should go to *any* extra lengths to support this...
     
    Doug Miller, Oct 24, 2009
    #17
  18. Jan C. Faerber

    Doug Miller Guest

    In article <>, "Jan C. Faerber" <> wrote:
    >On Oct 23, 10:03=A0pm, (Doug Miller) wrote:
    >> In article <=

    >..com>, "Jan C. Faerber" <> wrote:
    >>
    >> >is there a way to have an onmouseover effect with css without JS?
    >> >this could be just a simple way to change the colour of a <div>
    >> >section.
    >> >don't mean the traditional way to have another pic.
    >> >just the colour or another effect coming when moving the mouse over an
    >> >area.

    >>
    >> The :hover pseudo-class is probably what you're looking for.

    >
    >Works fine - a made a test file: http://www.lovedieu.eu/alt.html/hover.html
    >That seems to be a good way to forget about
    >painting buttons for a menu.
    >Does it come only with the <a> tag?


    Nearly all recent browsers support :hover on nearly all elements. IE6 and
    earlier don't, and IIRC neither does Firefox 2.
     
    Doug Miller, Oct 24, 2009
    #18
  19. Doug Miller wrote:

    > Nearly all recent browsers support :hover on nearly all elements. IE6 and
    > earlier don't, and IIRC neither does Firefox 2.


    Nope, FF2 did support :hover on elements as Netscape 7.x

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
     
    Jonathan N. Little, Oct 24, 2009
    #19
  20. Jan C. Faerber

    picayunish Guest

    Jonathan N. Little wrote:
    > Doug Miller wrote:
    >
    >> Nearly all recent browsers support :hover on nearly all elements. IE6
    >> and earlier don't, and IIRC neither does Firefox 2.

    >
    > Nope, FF2 did support :hover on elements as Netscape 7.x


    If I remember correctly Netscape 4.79 did also support :hover.
    --
    Edwin van der Vaart
     
    picayunish, Oct 24, 2009
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tor Inge Rislaa
    Replies:
    3
    Views:
    16,154
    Jerry III
    Aug 6, 2003
  2. Jay
    Replies:
    2
    Views:
    41,786
    Alex Papadimoulis
    Sep 30, 2003
  3. Frances Valdes

    Onmouseover

    Frances Valdes, Mar 2, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    798
    Frances Valdes
    Mar 3, 2004
  4. =?Utf-8?B?QXZpIFNoaWxvbg==?=

    OnMouseOver for a DataGrid control

    =?Utf-8?B?QXZpIFNoaWxvbg==?=, Jul 12, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    2,196
    Mr. Dot Net
    Jul 12, 2004
  5. =?Utf-8?B?c3RlZW1qZQ==?=

    Q: datagrid onmouseover css issue

    =?Utf-8?B?c3RlZW1qZQ==?=, Aug 2, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    585
    =?Utf-8?B?c3RlZW1qZQ==?=
    Aug 2, 2005
Loading...

Share This Page