Dzień dobry. Chcę, żeby były cztery kafelki obok siebie w dwóch rzędach. Dwa pierwsze maja należeć do klasy "tile1", trzeci-"tile2", a czwarty-"tile3". Jednak kiedy dodaje czwarty kafelek, całość ustawia się w pionie. proszę o pomoc.
<!DOCTYPE HTML>
<html lang="pl">
<head>
<meta charset="utf-8"/>
<title>Jan Kowalski- Portfolio</title>
<meta name="description" content="Stworzę dla ciebie wyjątkową stronę! Zatrudnij programistę webowego: HTML, CSS, JavaScript."/>
<meta name="keywords" content="HTML, CSS, JS"/>
<meta name="X-UA-Compatible" content="IE=edge,chrome=1"/>
<link rel="stylesheet" href="CSS.css" type="text/css"/>
<link href='https://fonts.googleapis.com/css?family=Lato|Josefin+Sans:600&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<script type="text/javascript">
</script>
</head>
<body>
<div id="contanier">
<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>
<div class="square"></div>
<div style="clear:both;"></div>
<div class="rectangle"></div>
</div>
</body>
</html>
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
}
.square
{
width:50%;
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
{
width:230px;
margin:10px;
height: 142px;
background-color: #3095d3;
float: left;
}
.tile2
{
float: left;
width:230px;
margin:10px;
height: 142px;
background-color: #666666;
}
.tile3
{
float: left;
width:230px;
margin:10px;
height: 142px;
background-color: #abcdef;
}