x
<html>
<head>
<title>CSS tutorial</title>
<style type="text/css">
div {
position:relative; overflow:visible;
width:90%; height:120px;
background-image:url('../../../img/tutorials/back_ex2.png');
background-repeat:no-repeat;
background-position:center;
}
div+div {
background-position:10% 90%;
}
p {
position:relative;
top:0px;
}
</style>
</head>
<body>
<div>
<p>This background picture is centered by using only one keyword</p>
</div>
<div>
<p>This background picture is offset by using percentages</p>
</div>
</body>
</html>
Comments
No comments have been made yet.
Please login to leave a comment. Login now