Hallo T3-Gemeinde,
ich möchte mittels CSS einen Bildaustausch beim überfahren/hovern einer Table (in einer Extension) realisieren.
Das Test-HTML File verhält sich auch genau wie gewünscht:
HTML-Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"> <head> <title>Titel</title> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /> <style type="text/css"> <!--
html,body {
margin: 0;
padding: 0;
background-color: #FFFFFF;
color: #000000;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 100%;
}
table {
table-layout: auto; /* auto=default | fixed kann der Opera nicht */
width: 80%;
margin: 9%;
border-spacing: 3px 12px;
border-collapse: separate;
border: 1px solid #000000;
background-color: #FFEE22;
}
table:hover {
background-color: #CC3333;
}
tr {
background-color: #EBE7D8;
}
tr:hover {
background-color: #33CC33;
}
td {
border: 2px groove #FFFFFF;
padding: 1px 3px 1px 3px;
font-size: 0.7em;
}
td.TEST {
width: 200px;
height: 200px;
border: 2px groove #FFFFFF;
padding: 1px 3px 1px 3px;
font-size: 0.7em;
background:url(A1-1.jpg)
}
td:hover {
background-color: #3333CC;
}
td:hover.TEST {
background-color: #FF0000;
background:url(A1-2.jpg);
}
--> </style> </head> <body> <table> <tr> <td>xxx</td> <td class="TEST">xxxTestxxx</td> <td>xxx</td> <td>xxx</td> </tr> <tr> <td>xxx</td> <td>xxx</td> <td>xxx</td> <td>xxx</td> </tr> <tr> <td>xxx</td> <td>xxx</td> <td>xxx</td> <td>xxx</td> </tr> </table> </body></html> In der Test-Zelle wird im Normalzustand halt das Bild A1-1.jpg angezeigt und beim drüber fahren (hover) das Bild A1-2.jpg.
Für T3 lese ich dann ein CSS ein:
Typoscript-Code:
1: 2: 3: 4:
| page.includeCSS { file1 = fileadmin/templates/res/stylesheet.css file3 = fileadmin/templates/res/hovereffekt.css } |
welches so aussieht:
HTML-Code:
table.ImageA1
{
background:url(uploads/tx_extension/A1-1.jpg);
}
table:hover.ImageA1
{
background:url(uploads/tx_extension/A1-2.jpg);
} In der Normalansicht wird auch das Bild A1-1.jpg angezeigt, aber beim hovern passiert nicht ...
Hat jemand eine Idee, was ich da falsch mache?
Grüße
Ralf