Avatar billede zux Nybegynder
17. marts 2000 - 23:52 Der er 4 kommentarer og
1 løsning

a class

I have seen that many pages uses the <a class> tag insted of <style>. This seems pretty smart, but how do I use it? How do I create a class?
Avatar billede hmau Nybegynder
18. marts 2000 - 00:07 #1
in your stylesheet you can declare a class as follows:

.info
{
    BACKGROUND-COLOR: black;
    COLOR: aqua;
    FONT-SIZE: 7pt;
    FONT-WEIGHT: normal
}
Avatar billede zux Nybegynder
18. marts 2000 - 12:02 #2
and then set a link to <a class="info">? What about onMouseover and so on?
Avatar billede hmau Nybegynder
18. marts 2000 - 13:54 #3
you can use the class in any tag

<td class="info">blablabla</td>

the following will underline your link if you put your cursor over it ie. hover

A:hover
{
    COLOR: #4a8c9c;
    TEXT-DECORATION: underline
}
Avatar billede zux Nybegynder
18. marts 2000 - 17:14 #4
can I have more than one class then`?

.info
{
    BACKGROUND-COLOR: black;
    COLOR: aqua;
    FONT-SIZE: 7pt;
    FONT-WEIGHT: normal
}

.main
{
    BACKGROUND-COLOR: white;
    COLOR: red;
    FONT-SIZE: 12pt;
    FONT-WEIGHT: normal
}

and then place it like

<a class="info">
and
<a class="main">
to different places on the page`?
Avatar billede hmau Nybegynder
18. marts 2000 - 17:15 #5
yes
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester