background image

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

In my web C# project, I'm able to put an image in background to my aspx
window but I it is in mosaique mode, I would like it in center mode.

Do you have an idea how to do this???

Thanks
Yves Lavoie
 
You have to use Cascading Stylesheets to do it. It may not look right on
older browsers though, and you may not be able to center it exactly as the
default for HTML has always been to tile the image. Try the following CSS
definition in your page, adjusting the URL to point to the location of your
background image.

<style type="text/css">
body
{ background-image: url('urlofmyimage.jpg');
background-repeat: no-repeat;
background-position: center; }
</style>

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Back
Top