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
|