7.8 Stildefinitionen für Buttons
Problem
Für die Submit- und Reset-Buttons eines Formulars sollen Farbe, Innenabstände, Rahmen und Rollover-Effekte definiert werden. In Abbildung 7-11 sehen Sie das Formular ohne Stildefinitionen für die Buttons, in Abbildung 7-12 mit Stildefinitionen.
Abbildung 7-11. Die Buttons ohne Stildefinitionen
Abbildung 7-12. Die Buttons mit Stildefinitionen
Lösung
Die Buttons werden mit einem class
-Attribut markiert, anhand dessen sie im Stylesheet ausgewählt werden können:
<form action="simplequiz.php" method="post"> <label for="question">Wie ...
Get CSS Kochbuch now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.