•  
     

div float:right e p float:left - HTML & CSS

index.html

Código: Selecionar todos

<!DOCTYPE html>
<html>
	<head>
		<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
		<title>div float:right e p float:left - HTML & CSS</title>
	</head>
	<body>
		<div></div>
		<p>Check it out! I'm a block of text, but the &lt;div&gt; and I can live in harmony. Boats on a sea, man. Boats on a sea.</p>
	</body>
</html>


stylesheet.css

Código: Selecionar todos

div {
	height: 200px;
	width: 200px;
	border: 2px solid black;
	border-radius: 5px;
	background-color: #308014;
	float:right;
	
}

p {
	font-family: Verdana, sans-serif;
	font-size: 20px;
	width: 280px;
	float:left;
	
}

Demo: http://jsfiddle.net/2WXfn/