25-02-2012, 19:36
Witam wszystkich !! Mam problem z menu w html i css chodzi o to że nie wiem jak zrobić w css żeby wielkość moich przycisków była taka sama zawsze są one tak szerokie jak napisze tekst dodałem np. width:80px i nic proszę o pomoc
Kod:
<?xml version="1.0" encoding="iso-8859-2"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<meta http-equiv="Content-type" content="application/xhtml+xml; charset=iso-8859-2" />
<meta name="Description" content=" [wstaw tu opis strony] " />
<meta name="Keywords" content=" Lech Poznań " />
<meta name="Author" content=" Jakub Nawrocki " />
<meta name="Generator" content="kED" />
<title>Lech Poznań </title>
<link rel="stylesheet" href=" style.css" type="text/css" />
</head>
<body>
<div id="strona">
<div id="menu">
<ul>
<li><a href="http://forum.pclab.pl/topic/770595-Upgrade-starego-grata-za-max-1000zł">Strona Główna</a></li>
<li><a href="#">Download</a></li>
<li><a href="#">Kontakt</a></li>
<li><a href="#">Forum</a></li>
</ul>
</div>
<div id="top"><a name="odsylacz"></a></div>
<div id="prawa"><p>Tekst</P></div>
<div id="stopka"><a href="file://localhost/C:/Users/Jakub/Desktop/Szkoła/www/index.html#odsylacz">odsylacz</a></div>
<div id="end"><p style="color:red">sŁONY <a href="http://www.interia.pl">Intera</a></p></div>
<div id="obrazek"><img src="k.png" width="550" height="50"></div>
</div>
</body>
</html>
Kod:
body{background-color:white;
background-attachment: fixed;
background-repeat:repeat;
}
*{
margin: 0 auto;
padding: 0;
}
#strona{
margin-top:10px;
margin-bottom:10px;
width:800px;
height:1000px;
background-color:black;
border:solid 1px white;
}
#menu{
width: 798px;
height:80px;
margin-top:10px;
border: solid 1px red;
background: white;
}
ul, ul li {
display: block;
list-style: none;
margin: 0px 0px 0px 0px;
padding: 0;
}
ul {
text-align:center;
}
ul li {
display: inline;
white-space: nowrap;
}
#menu a {
border: solid 1px black;
padding: 1px;
background: red;
width:40px;}
#top{
margin-top:400px;
margin-left:5px;
float:left;
width:600px;
height:40px;
background-color:white;
border:solid 1px red;}
#prawa{
margin-top:400px;
margin-right:5px;
float:right;
width:50px;
height:50px;
background-color:white;
border: solid 1px red;
}
#stopka{
margin-top:960px;
width:600px;
height:20px;
background-color:blue;
border: solid 1px red;
}
#end{
margin-top:-440px;
margin-left:5px;
width:788px;
height:400px;
background-color:blue;
border: solid 1px white;
}
#obrazek{
position:absolute;
background-color:white;
border:solid 1px red;
margin-top:-500px;
margin-right:5px;
margin-left:100px;
}