Click here to Skip to main content
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 449
1 Maciej Los 274
2 CPallini 160
3 Sergey Alexandrovich Kryukov 152
4 Richard MacCutchan 130
0 OriginalGriff 5,634
1 Sergey Alexandrovich Kryukov 4,763
2 Peter Leow 2,954
3 Maciej Los 2,614
4 DamithSL 2,465


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