28112 sujets

CSS et mise en forme, CSS3

bonjours je cherche a mettre mes deux bloque l'un a cote de l'autre j'ai essayer avec float mais sa ne marche pas meme en mettant float left sur l'autre comment puis-je faire ? voila mes code :

<!DOCTYPE html>
<html lang="fr">
    <head>
	    <meta charset="UTF-8" />
		<link rel="stylesheet" href="style.css" />
		<title>nom du titre</title>
	</head>
	<body>
	<div class="page">
	<header>
		<p>header</p>
	</header>
	<main>
		<article>article
			<section>section 1</section>
		</article>
		<div class="bloc2">
			<p>section 2</p>
		</div>
	</main>
	<footer>
		<p>bloc2</p>
	</footer>
	</div>
	</body>
</html>


header
{
	background-color: red;
	padding-top: 20px;
	padding-bottom: 20px;
	text-align: center;
	border: 1px solid #000000;
}
footer
{
	background-color: orange;
	padding-top: 20px;
	padding-bottom: 20px;
	text-align: center;
	border: 1px solid #000000;
	vertical-align: bottom;
	clear: both;
}
body
{
	width: 990px;
	margin: auto;
}
article
{
	width: 630px;
	background-color: grey;
	height: 800px;
	border: 1px solid #000000;	
}
.bloc2
{
	background-color: grey;
	width: 300px; 
	height: 400px;
	float: right;
	border: 1px solid #000000;
}