Click here to Skip to main content
11,584,556 members (70,895 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
i am working on c# asp.net web pplication .net 4.5

i used this code to insert background image on webform.
<body background="image.jpg"> </body>
but the problem is that this image is repeated 5 to six time on page.

is there any possibilty to insert the image once on page???

thanks
Posted 6-Oct-12 7:06am
Edited 6-Oct-12 7:08am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

You Can use this Code too : 
<body style="background: url('image.jpg') no-repeat;"></body>
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Here is the trick
<style type="text/css">
body
{
background-image:url('image.jpg');
background-repeat:no;
}
</style>

You can also add the style in css instead of inline style.

Hope this helps.
cheers
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 1,703
1 Sergey Alexandrovich Kryukov 1,267
2 Abhinav S 711
3 Dave Kreskowiak 687
4 Suvendu Shekhar Giri 568


Advertise | Privacy | Mobile
Web03 | 2.8.150707.1 | Last Updated 6 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100