Witam, robię stronkę według instrukcji z tego poradnika:
https://www.youtube.com/watch?v=5y3Qc9Qs6TY&index=4&list=PLOYHgt8dIdox9Qq3X9iAdSVekS_5Vcp5r
Ale pomimo tego, że mój główny pojemnik, w którym jest całą zawartość strony ma szerokość 1000px i wyrówane marginesy po prawej i po lewej klasa rectangle ucieka sobie na prawo w przypadku stopki.
Tu oba kody(piszę w html, ale nie było, więc zaznaczyłem xhtml) :
<!DOCTYPE HTML>
<html lang="pl">
<head>
<meta charset="utf-8"/>
<title>Jan Kowalski - Portfolio</title>
<meta name="description" content="Jestem programistą webowym. Znam się na technologiach HTML, CSS, JavaScript oraz PHP."/>
<meta name="keywords" content="Tworzenie stron, oferty, programista webowy, html, css, javascript, php"/>
<meta http-equiv="X-VA-Compatible" content="IE=edge,chrome=1"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link href='https://fonts.googleapis.com/css?family=Lato|Josefin+Sans&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="container">
<div class="rectangle">
<div id="logo">
Jan Kowalski
</div>
<div id="zegar">
12:00:00
</div>
<div style="clear:both;"></div>
</div>
<div class="square">
<div class="tile1">
1.
</div>
<div class="tile1">
1.
</div>
<div style="clear:both;"></div>
<div class="tile2">
2.
</div>
<div class="tile3">
3.
</div>
<div style="clear:both;"></div>
<div class="tile4">
4.
</div>
</div>
<div class="square">
<div class="tile5">
5.
</div>
<div class="yt">
yt
</div>
<div class="fb">
fb
</div>
<div class="gplus">
g+
</div>
<div class="tw">
tw
</div>
<div style="clear:both;"/>
</div>
<div style="clear: both;"></div>
<div class="rectangle">
<div class="footer">
2016 © Jan Kowalski - Porfolio. Programista webowy zaprasza do współpracy.
</div>
</div>
</div>
</body>
</html>
A tutaj CSS:
body
{
background-color: #303030;
color: #ffffff;
font-family: 'Lato', sans-serif;
font-size:20px;
}
#container
{
width: 1000px;
margin-left: auto;
margin-right: auto;
}
.rectangle
{
width: 960px;
margin: 20px;
background-color:black;
}
.square
{
width:500px;
float:left;
}
#logo
{
float:left;
font-family: 'Josefin Sans', sans-serif;
font-size:70px;
width:600px;
}
#zegar
{
float:left;
font-family: 'Josefin Sans', sans-serif;
font-size:70px;
}
.tile1
{
float:left;
margin:10px;
width:230px;
height:142px;
background-color:#3095d3;
}
.tile2
{
float:left;
margin:10px;
width:230px;
height:142px;
background-color:#666666;
}
.tile3
{
float:left;
margin:10px;
width:230px;
height:142px;
background-color:#93c748;
}
.tile4
{
margin:10px;
width:480px;
height:142px;
background-color:#ee5232;
}
.tile5
{
margin:10px;
width:480px;
height:304px;
background-color:#666666;
}
.yt
{
float:left;
margin:10px;
width:105px;
height:142px;
background-color:#d94348;
}
.fb
{
float:left;
margin:10px;
width:105px;
height:142px;
background-color:#4668b3;
}
.gplus
{
float:left;
margin:10px;
width:105px;
height:142px;
background-color:#d95333;
}
.tw
{
float:left;
margin:10px;
width:105px;
height:142px;
background-color:#3095d3;
}
.footer
{
text-align:left;
}