Body background

R

ruca

How can I set body background with an image, but centered and not tiled?

When I put background="image1", it fills my page with the image many times.
I only want to put at the beggining and centered. I don't won't to use <img
src="image1"> because I have a choice menu that I want over the image.
 
C

Cowboy \(Gregory A. Beamer\)

IE only or all browsers. For all browsers, you will have to make a DIV with
a Z-order that places it in back. This is easiest when you use the grid
layout in Visual Studio .NET (ie, you set all items into DIVs). A Panel can
be used to set the watermark in, as a panel control becomes a DIV when
rendered.

To see this in action (outside of VS.NET), you can go to:
http://www.ricocheting.com/js/watermark.html

To set a watermark for IE only, simply choose the body element (right click
a page and go to properties in VS.NET) and set bgPropeties to fixed. That
will cement the image as a watermark.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
R

ruca

The question is:
the image still appears many times in background and I only want that
appears one time and centered.

How?????????????


--

Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
 
M

Martin Dechev

Hi, ruca,

You should do some reading on cascading style sheets, I think. Anyway, try:

<body style="background: url(images/background.jpg) no-repeat center center
transparent;">

Just change "images/background.jpg" with the path+filename of your image.

Greetings
Martin
 
D

Dan Brussee

Which of course only works on IE,,,, right?

Hi, ruca,

You should do some reading on cascading style sheets, I think. Anyway, try:

<body style="background: url(images/background.jpg) no-repeat center center
transparent;">

Just change "images/background.jpg" with the path+filename of your image.

Greetings
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top