background image position : background position : Box Model HTML CSS TUTORIALS


HTML CSS TUTORIALS » Box Model » background position »

 

background image position


 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Positioning Backgrounds</title>
<style>
body {
font: 16px Verdana, Arial, Helvetica, sans-serif;
margin: 20px;
color: black;
background-color: #FFFFCC;
}
h1 {
font: 24px Verdana, Arial, Helvetica, sans-serif;
margin: 20px;
padding: 35px;
border: 2px solid;
}
h1.left {
background-image: url(position-test.gif);
background-repeat: no-repeat;
background-position: left;
}
h1.right {
background-image: url(position-test.gif);
background-repeat: no-repeat;
background-position: right;
}
h1.bottom {
background-image: url(position-test.gif);
background-repeat: no-repeat;
background-position: bottom;
}
h1.center {
background-image: url(position-test.gif);
background-repeat: no-repeat;
background-position: center;
}
</style>
</head>
<body>
<h1>pristine &amp; clean</h1>
<h1 class="left">background-position: left;</h1>
<h1 class="right">background-position: right;</h1>
<h1 class="bottom">background-position: bottom;</h1>
<h1 class="center">background-position: center;</h1>
</body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Box Model
» background position