To jest mój aktualny kod:
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2"> <link rel="stylesheet" type="text/css" href="style.css" /> <body align="center" background="images/tlo.jpg" width="100%" height="100%" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div class="menu"><a href="" class="menu" style="valign:middle;">Home
</a></div>
i CSS:
.body{
width:1200px;
height:800px;
}
.head{
background-image: url(images/i_01.gif);
width:1200px;
height:16px;
margin:0 auto;
}
.top{
background-image: url(images/i_02.gif);
width:1200px;
height:120px;
margin:0 auto;
}
.logo_menu{
background-image: url(images/i_03.gif);
width:1200px;
height:15px;
margin:0 auto;
}
.menu_all{
width:1200px;
height:58px;
display: inline;
overflow: hidden;
padding:0px;
padding-bottom: 100000000px;
margin-bottom: -100000000px;
}
.menu_lew{
background-image: url(images/i_04.gif);
position: relative;
float:left;
margin-right:0px;
overflow: hidden;
padding:0px;
width:142px;
height:58px;
}
.menu{
background-image: url(menu/menu.gif);
valign:middle;
float:left;
margin-left:0px;
overflow: hidden;
padding:0px;
color:white;
width:96px;
height:58px;
text-decoration: none;
text-size: 12;
}
.menu:hover{
background-image: url(menu/menu_activ.gif);
valign:middle;
float:left;
margin-left:0px;
overflow: hidden;
padding:0px;
color:yellow;
width:96px;
height:58px;
text-decoration: underline;
text-size: 15;
}
.iks{
background-image: url(menu/iks.gif);
float:left;
position: relative;
width:5px;
height:58px;
}
.sciana{
background-image: url(menu/space.gif);
float:left;
position: relative;
width:4px;
height:58px;
}
Dlaczego muszę mieć <center>, gdy daje go w CSS to nie reaguje. Nie mogę też dać valign:middle; dla linków. Proszę o pomoc...
Strona aktualnie wygląda tak:
http://i45.tinypic.com/1632gm.jpgJeśli daje w ustawieniach menu (linki) valign:middle; i align:center; to linki są cały czas jak na zdjęciu, nie reagują na opcje. Nie mogę ich dać na środek. Dlaczego?
Chcę całą stronę dać też na środek, bo trzyma się lewej strony. I nie mogę... daje w .body align:center; i nic. Gdy dam w kodzie strony <center> to daje wszystko na środek linki też. Ale wtedy tekst i wszystko jest na środku.