Hey,
ich versuche zur Zeit einen Button in CSS3 zu coden.
Jetzt möchte ich, das die Größe des Buttons sich automatisch an die Breite des Textes anpasst.
Und der "button1arrow" rechts ist.
Mit text-align klappt das i.wie nicht?!
CSS
HTML
Gruß Basti
ich versuche zur Zeit einen Button in CSS3 zu coden.
Jetzt möchte ich, das die Größe des Buttons sich automatisch an die Breite des Textes anpasst.
Und der "button1arrow" rechts ist.
Mit text-align klappt das i.wie nicht?!
CSS
Code:
.button1{
background:-moz-linear-gradient(top, #128ccd, #0162a9); /***Mozilla Firefox***/
background:-webkit-gradient(linear, left top, left bottom, from(#128ccd), to(#0162a9)); /***Goolge Chrome, Safari***/
-moz-border-radius: 4px; /***Mozilla Firefox***/
-webkit-border-radius: 4px; /***Google Chrome, Safari***/
padding: 13px;
font-family: Verdana, Arial;
font-size: 16px;
font-weight:bold;
color: #e8e8e8;
height: 18px;
text-shadow: -1px -1px 0px #666;
}
.button1arrow{
background:-moz-linear-gradient(top, #ededed, #cfcfcf); /***Mozilla Firefox***/
background:-webkit-gradient(linear, left top, left bottom, from(#ededed), to(#cfcfcf)); /***Goolge Chrome, Safari***/
-moz-border-radius-topright: 4px; /***Mozilla Firefox***/
-moz-border-radius-bottomright: 4px; /***Mozilla Firefox***/
-webkit-border-top-right-radius: 4px; /***Google Chrome, Safari***/
-webkit-border-bottom-right-radius: 4px; /***Google Chrome, Safari***/
color:#ff0000;
padding: 13px;
}
HTML
Code:
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<p class="button1">
Button 1
<span class="button1arrow">
GO
</span>
</p>
</body>
</html>
Zuletzt bearbeitet: