DivCSS.html
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: #ffffff url("Sri-Krishna.jpg") no-repeat right top;
margin-right: 200px;
height:500px;
width:250px;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
<p>Now the background image is only shown once, and it is also positioned away from the text.</p>
<p>In this example we have also added a margin on the right side, so that the background image will not disturb the text.</p>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<style>
body {
background: #ffffff url("Sri-Krishna.jpg") no-repeat right top;
margin-right: 200px;
height:500px;
width:250px;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
<p>Now the background image is only shown once, and it is also positioned away from the text.</p>
<p>In this example we have also added a margin on the right side, so that the background image will not disturb the text.</p>
</body>
</html>
0 comments
Post a Comment