•  
     

margin-top, margin-right, margin-bottom e margin-left - HTML & CSS

index.html

Código: Selecionar todos

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>margin</title>
	</head>
	<body>
		<div></div>
	</body>
</html>	


stylesheet.css

Código: Selecionar todos

* {
	border: 1px dashed black;
}

div {
	height: 50px;
	width: 100px;
	border: 2px solid black;
	border-radius: 5px;
	background-color: #308014;
	margin-top:20px; 
    margin-right:50px; 
    margin-bottom:10px; 
    margin-left:5px;
}

Demo: http://jsfiddle.net/8Kr3w/