CSS Backgrounds Advanced Code


Submitted by:David Villa

Date added:24 November, 2011

Category:CSS

Advanced background example by CSS

Tags: backgrounds image

Code Snippet:

<html>
<head>
<style type="text/css">
body
{
margin-left:200px;
background:#5d9ab2 url('background_img.png') no-repeat top left;
}

.container
{
text-align:center;
}

.center_div
{
border:1px solid gray;
margin-left:auto;
margin-right:auto;
width:90%;
background-color:#d0f0f6;
text-align:left;
padding:8px;
}
</style>
</head>

<body>
<div class="container">
<div class="center_div">
<h1>Hello World!</h1>
<p>Advanced background example by CSS</p>
</div>
</div>
</body>
</html>

 
 

Comments