Jestem dopiero początkujący i chciałem stworzyć na początek ogólny zarys strony (rozmieszczenie elementów) i napotkałem pewien irytujący problem... .
W bloku "tresc" znajduja się luki (nad tytułem i tekstem poniżej) należace do "tresci", a powinny do blokow "title" i "text".
Trochę namieszałem . Najlepiej skopiujcie kod i sami zobaczcie.
Bardzo proszę Was o pomoc.
- Kod: Zaznacz cały
html, body{
color: #FFFFFF;
background-color: #000000;
margin: 0;
padding: 0;
}
#podstawa{
overflow: auto;
background-color: #000000;
margin: 10px 12% 20px 12%;
}
#header{
background-color: #815200;
overflow: hidden;
width: 100%;
}
#menu{
float: left;
background-color: #000000;
width: 24%;
overflow: hidden;
border-style: solid;
border-width: 2px;
border-color: #888888;
margin-top: 10px;
}
#tresc{
background-color: #000000;
float: left;
width: 49%;
overflow: hidden;
margin-left: 10px;
margin-right: 10px;
margin-top: 10px;
}
#news{
border-style: solid;
border-width: 2px;
border-color: #888888;
overflow: hidden;
}
#news .title{
text-align: center;
padding: 0;
background-color: #444444;
}
#news .text{
padding: 5px 5px 5px 5px;
background-color: #333333;
}
#pseudomenu{
background-color: #000000;
float: right;
overflow: hidden;
width: 24%;
border-style: solid;
border-width: 2px;
border-color: #888888;
margin-top: 10px;
}
#stopka{
clear: both;
background-color: #444444;
overflow: hidden;
width: 100%;
margin-top: 10px;
}
h1{
font-family: arial, "New Times Roman", verdana;
font-size: 60px;
text-align: center;
margin-top: 6px;
margin-bottom: 6px;
}
h2{
font-family: arial, "New Times Roman", verdana;
font-size: 50px;
text-align: center;
margin-top: 5px;
margin-bottom: 5px;
}
h3{
font-family: arial, "New Times Roman", verdana;
font-size: 40px;
text-align: center;
margin-top: 5px;
margin-bottom: 5px;
}
h4{
font-family: arial, "New Times Roman", verdana;
font-size: 30px;
margin-top: 5px;
margin-bottom: 5px;
}
h5{
font-family: arial, "New Times Roman", verdana;
font-size: 20px;
margin-top: 4px;
margin-bottom: 4px;
}
h6{
font-family: arial, "New Times Roman", verdana;
font-size: 10px;
margin-top: 2px;
margin-bottom: 2px;
}
p{
font-size: 15px;
font-family: arial, "New Times Roman", verdana;
}
- Kod: Zaznacz cały
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs">
<head><!-- ščřžýŠČŘŽÝ -->
<meta name="generator" content="PSPad editor, www.pspad.com" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="Stylesheet" type="text/css" href="Ogolnie.css" />
<title>Szablon Przykładowy</title>
</head>
<body>
<div id = "podstawa">
<div id = "header">
<h1>Hej</h1>
</div>
<div id = "menu">
<h1>Hejka</h1>
</div>
<div id = "tresc">
<div id= "news">
<div class = "title">
<h2>Jak się masz? :)</h2>
</div>
<div class = "text">
Przykładowy news.
</div>
</div>
</div>
<div id = "pseudomenu">
<h1>:)</h1>
</div>
<div id ="stopka">
<h1>Koniec</h1>
</div>
</div>
</body>
</html>