Ich habe einige CSS-Buttons, die größer sind, wenn sie über den Cursor gezogen werden. Ich habe den Text auch größer gemacht, aber ich möchte den Text um ein paar Pixel nach unten verschieben, ohne das verwendete Hintergrundbild zu stören.CSS: Bewegen Sie den Text ein paar Pixel nach unten, aber den Hintergrund noch halten?
Hilfe?
mein Code sieht wie folgt aus:
<div id="nav">
<a href="index.php">Home</a>
<a id="headrush">Beer Bongs</a>
<a id="thabto">Novelty</a>
</div>
#nav a {
background: url(Images/Button.png);
height: 28px;
width: 130px;
font-family: "Book Antiqua";
font-size: 12px;
text-align: center;
vertical-align: bottom;
color: #C60;
text-decoration: none;
background-position: center;
margin: auto;
display: block;
position: relative;
}
#nav a:hover {
background: url(Images/Button%20Hover.png);
height: 34px;
width: 140px;
font-family: "Book Antiqua";
font-size: 16px;
text-align: center;
color: #C60;
text-decoration: none;
margin: -3px;
z-index: 2;
}
#nav a:active {
background: url(Images/Button%20Hover.png);
height: 34px;
width: 140px;
font-family: "Book Antiqua";
font-size: 14px;
text-align: center;
color: #862902;
text-decoration: none;
margin: 0 -3px;
z-index: 2;
}
OT: Bitte fügen Sie 'role = "button" 'zu den Links, so dass der Browser sie als Schaltflächen ansieht –