Witam,
Aktualnie uczę się php i mysql, ale również skrobię sobie coś w html i css. Zrobiłem sobie takie menu, po najechaniu zmienia się wielkość obrazka.
(IMG:http://img695.imageshack.us/img695/308/beznazwy2sm.png)
Przesunąłem sobie tekst obrazka za pomocą padding-top: wartość. Problem w tym, że tak jakby opuszcza się to co było wcześniej pod tekstem i wystarczy najechać 45px pod obrazkiem aby się podświetlił.
jak coś to tu jest kod (na testy tylko jedna grafika)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<link rel="stylesheet" href="styles.css" type="text/css" /> <meta http-equiv="content-type" content="text/html; charset=iso-8859-2" />
<a id="szukaj" href="index.html">Szukaj
</a> <a id="szukaj" href="index.html">Szukaj
</a> <a id="szukaj" href="index.html">Szukaj
</a> <a id="szukaj" href="index.html">Szukaj
</a> <a id="szukaj" href="index.html">Szukaj
</a> <a id="szukaj" href="index.html">Szukaj
</a> <a id="szukaj" href="index.html">Szukaj
</a>
html {
background-color: #ffffff;
}
body {
height: 500px;
width: 800px;
margin-top: 0;
margin-left: auto;
margin-right: auto;
background-color: #08214b;
}
a {
border: 0;
text-decoration: none;
}
a#szukaj {
height: 50px;
width: 50px;
float: left;
color: #ffffff;
font-family: Verdana, sans-serif;
font-size: 12px;
padding-top: 45px;
text-align: center;
display: block;
height: 50px;
width: 50px;
background: url('images/szukaj.png');
background-repeat: no-repeat;
}
a#szukaj:hover {
height: 50px;
width: 50px;
float: left;
color: #ffffff;
font-family: Verdana, sans-serif;
padding-top: 50px;
text-align: center;
display: block;
background: url('images/szukaj-hover.png');
background-repeat: no-repeat;
}
Chyba doszedłem do tego jak to rozwiązać ale proszę o radę czy to jest najlepszy sposób. Zmienic css dla menu-bar, nadać mu height i overflow: hidden. Czy to dobry sposób?