Welcome to Sitepoint, waylman.
by default, any block element : div, p, ul, ol, blockquote , etc. will stretch to fill the width of its parent element(always use the proper semantic element to wrap each part of your content).
What that means is any BLOCK child of a body element will do this.
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
<style type="text/css">
.center{margin:0 auto; width:960px;
border-top: 5px solid pink;
border-bottom: 5px solid pink;
}
.wrap{
background: #51f;
border-top: 2px solid orange;
border-bottom: 15px solid orange
}
</style>
</head>
<body>
<div class="wrap">
<p class="center"><em>Am a centered paragraph of content </em>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</body>
</html>
hope that helps
Bookmarks