Thursday, 19 July 2012
How to position a background image in css
<head>
<style type="text/css">
body
{
background-image:url('yourimg.png');
background-repeat:no-repeat;
background-position:right top;
margin-right:200px;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
<p>background no-repeat, set postion example.</p>
<p>Now the background image is only shown once, and positioned away from the text.</p>
</body>
</html>
This post was written by: Bharathi
Bharthi is a professional blogger, web designer and front end web developer. Follow him on Twitter
Subscribe to:
Post Comments (Atom)
0 Responses to “How to position a background image in css”
Post a Comment