473,396 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Body background

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.
--

Thank's (if you try to help me)
Hope this help you (if I try to help you)
ruca
Nov 18 '05 #1
4 1848
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!
************************************************** ********************
"ruca" <ru***@iol.pt> wrote in message
news:uS**************@TK2MSFTNGP10.phx.gbl...
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.
--

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

Nov 18 '05 #2
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


"Cowboy (Gregory A. Beamer)" <No************@comcast.netNoSpamM> escreveu na
mensagem news:ev**************@tk2msftngp13.phx.gbl...
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!
************************************************** ********************
"ruca" <ru***@iol.pt> wrote in message
news:uS**************@TK2MSFTNGP10.phx.gbl...
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.
--

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


Nov 18 '05 #3
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
"ruca" <ru***@iol.pt> wrote in message
news:uS**************@TK2MSFTNGP10.phx.gbl...
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.
--

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

Nov 18 '05 #4
Which of course only works on IE,,,, right?

On Mon, 1 Mar 2004 15:59:12 +0100, "Martin Dechev"
<de*******@hotmail.com> wrote:
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
"ruca" <ru***@iol.pt> wrote in message
news:uS**************@TK2MSFTNGP10.phx.gbl...
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.
--

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


Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Serge Hartmann | last post by:
hi there, I created two different backgrounds for the same page to obtain a (fake) left margin and a (true) right margin. -> left background, defined in body section, aligned bottom and with...
5
by: Unknown User | last post by:
Here's my page: http://www.abahia.com/smartads/ I want the beige background all over the page. It works fine in Opera 8, in IE 5.5 and 6, in Maxthon, but in Mozilla, there is a large white margin...
11
by: Joe | last post by:
If you display the styles in use at Yahoo.com, you can see some interesting things. For example, this: html>body{font:84.5%/122% arial;} I tried creating a sample page using this style and it...
5
by: Dan Novak | last post by:
Hello, I'm trying to apply different backgrounds to a page based on the BODY element class. It's working on some browsers but not on others. I've searched Google and the groups, pored through...
10
by: Richard Steele | last post by:
Can anyone help me I am developing an application runs on a PC (client) only. For graphical reasons it was decided that the content would be displayed in a Browser that is embedded in a Windows...
5
by: bipède | last post by:
Hi, Is it possible in Mozilla / Firefox / Netscape to fix minimum size for html and/or body element in a "real" XHTML (mime application/xhtml+xml) page so that when there is few text in a page...
19
by: david.karr | last post by:
If in my CSS I set the "background-color" property on the "body" element, it only covers the background of the elements defined in the body, up to the current width and height of the page. However,...
4
by: AAaron123 | last post by:
<body runat="server" id="MainBody"> <form id="form1" runat="server" style="background-color:green; width: 100%; height: 100%"> <br /> Table1" runat="server" Style="background-color:Yellow;...
3
by: Noorain | last post by:
I designed a site. i want to header,footer,left & right column fixed but body information only scrolling. this site screen to be 800/600 px. i designed this way but when i used position fixed all...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.