Hallo, ich habe ein Problem bei mir rutsch mein test immer wenn ich diesen center in die nächste zeile unter dem Bild. Ich will den Text aber über dem Bild zentriert haben. Was ist mein Problem?
hier der Style Sheet:
.cssnav {
position:relative;
font-family: arial;
background-image: url(button_pressed.jpg);
background-repeat: no-repeat;
display: block;
width: 100px;
height: 20px;
margin: 0;
margin-bottom:0px;
padding: 0;
}
.cssnav a {
display:block;
font-size: 12px;
text-align:center;
width: 100px;
height: 20px;
color: black;
text-decoration: none;
}
.cssnav img {width: 100%; height: 100%; border: 0; }
* html a:hover {visibility:visible}
.cssnav a:hover {
color:red;
}
.cssnav a:hover img{visibility:hidden}
.cssnav span {
float:center;
cursor: pointer;
}
hier der Style Sheet:
.cssnav {
position:relative;
font-family: arial;
background-image: url(button_pressed.jpg);
background-repeat: no-repeat;
display: block;
width: 100px;
height: 20px;
margin: 0;
margin-bottom:0px;
padding: 0;
}
.cssnav a {
display:block;
font-size: 12px;
text-align:center;
width: 100px;
height: 20px;
color: black;
text-decoration: none;
}
.cssnav img {width: 100%; height: 100%; border: 0; }
* html a:hover {visibility:visible}
.cssnav a:hover {
color:red;
}
.cssnav a:hover img{visibility:hidden}
.cssnav span {
float:center;
cursor: pointer;
}