programming-examples/css/Centering a layout horizontally.html
2019-11-15 12:59:38 +01:00

36 lines
797 B
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:subLang="en" subLang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Centering a layout horizontally</title>
<style type="text/css" media="screen">
body {
text-align:center;
min-width:500px;
}
#wrapper {
margin:0 auto;
width:500px;
text-align:left;
background-color:pink;
border:2px solid #f94479;
}
p { padding:0 1em; }
</style>
</head>
<body>
<div id="wrapper">
<p>A loving heart is the beginning of all knowledge.<br><br>
Thomas Carlyle</p>
</div>
</body>
</html>