Background-position in css

We want to change the position of the image, so that it does not disturb the text too much.
The position of the image is specified by the background-position property:



<!DOCTYPE html>
<html>
<head>
<style>
body {
  background-image: url("img_tree.png");
  background-repeat: no-repeat;
  background-position: right top;
  margin-right: 200px;
}
</style>
</head>
<body>

<h1>Hello World!</h1>
<p>Technisia</p>
<p>Technology</p>
<p>In this example we have also added a margin on the right side, so the background image will never disturb the text.</p>

</body>
</html>

Comments

Popular posts from this blog

css3 Borders

Introduction to CSS

Background repeat and no-repeat in css