Re: Hover question.

Discussion in 'HTML' started by dorayme, Oct 4, 2008.

  1. dorayme

    dorayme Guest

    In article <>,
    DLU <> wrote:

    > I have one CSS for hover.
    >
    > .link A:hover {
    > font-size: 100%;
    > color: blue;
    > background-color: white;
    > width: 100%;
    > display: block;
    > }
    > How would I add a second hover that does a different task, and how do
    > I tell that section to use the different hover?


    You can have a different hover style in addition by use of class or id
    or indeed other ways. You need to be able to identify the bits in the
    html that you need a different hover from the one above. Several ways to
    go.

    The one above targets links in elements of class="link". So you could
    have an element on the page or on a different page that was of
    class="linksToInventions" and links inside elements of that class could
    be made to hover differently by

    ..linksToInventions a:hover {...}

    There are no simple rules how you target things, everything depends on
    your site. For example if the site is just one big page and somewhere
    you have links to various inventions (like the one that Ben C reckons
    wards off teenagers*) then you might do what I suggest above by classing
    a ul or a container div for the ul depending.

    But if it is links on particular pages you want to hover differently,
    then you can target the pages by classing a main wrapper for those pages.

    The only rules of how to do all this stuff best is to be found in design
    space. Design space is all the logically possible ways to markup and css
    a website (how the thing looks is assumed to be a fixed given in this
    idea). But outlining the criteria for which set of docs would trump
    others would require probably a research project to even sound sensible.
    But this will not stop usenet subscribers from venturing opinions.

    I am so glad I find no need to be so opinionated... Lucky genes, I
    guess.

    --------------
    * btw, I don't they work - devices to emit sounds at frequencies under
    the ken of adults - because teenagers are stone deaf through exposure to
    crazily loud music and simply a well honed ability *not* to listen
    anyway.

    --
    dorayme
     
    dorayme, Oct 4, 2008
    #1
    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. msnews.microsoft.com
    Replies:
    0
    Views:
    2,326
    msnews.microsoft.com
    Jun 26, 2003
  2. Paul

    Toolbar appears on image hover

    Paul, Jul 16, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    377
  3. Hover Question

    , Sep 16, 2005, in forum: HTML
    Replies:
    8
    Views:
    1,945
    Alan J. Flavell
    Sep 18, 2005
  4. Lars Eighner

    Re: Hover question.

    Lars Eighner, Oct 4, 2008, in forum: HTML
    Replies:
    2
    Views:
    448
    Lars Eighner
    Oct 4, 2008
  5. Jonathan N. Little

    Re: Hover question.

    Jonathan N. Little, Oct 5, 2008, in forum: HTML
    Replies:
    0
    Views:
    380
    Jonathan N. Little
    Oct 5, 2008
Loading...

Share This Page