Fixed-width background

S

Steve

How can I specify a background image so that the image dynamically
resizes depending on the resolution of the viewer's screen? That is,
background images ordinarily appear bigger when viewed on
low-resolution screens and smaller when viewed on high-resolution
screens. Is there any way to display the background graphic as
'centered, 50% of screen width"? Alternatively, is there any way to
keep the background graphic from tiling? The web page needs to be
viewable by those without Java, and by those using AOL as well as IE6.
TIA
steve
 
A

Adrienne

How can I specify a background image so that the image dynamically
resizes depending on the resolution of the viewer's screen? That is,
background images ordinarily appear bigger when viewed on
low-resolution screens and smaller when viewed on high-resolution
screens. Is there any way to display the background graphic as
'centered, 50% of screen width"? Alternatively, is there any way to
keep the background graphic from tiling? The web page needs to be
viewable by those without Java, and by those using AOL as well as IE6.
TIA
steve

Background images cannot be resized. However, they can be kept from
tiling.

body {background-image: url("yourimage.png"); background-repeat: no-
repeat; background-color: color similar to image; color: contrasting color
for text;}

You are also confusing Java with Javascript, they are not the same.
 
B

Brett

Is there any way to display the background graphic as
'centered, 50% of screen width"?

body{background-position: center;} <-- this will be centered top to bottom
and left to right
body{background-position: center top;} <--this will be centered horizontally
and aligned at top
....ect.
 
R

Richard

Adrienne said:
Gazing into my crystal ball I observed Steve
<[email protected]>
writing in news:[email protected]:

Background images cannot be resized. However, they can be kept from
tiling.
body {background-image: url("yourimage.png"); background-repeat: no-
repeat; background-color: color similar to image; color: contrasting
color
for text;}

{background-position: center} may work in some browsers.


You are also confusing Java with Javascript, they are not the same.
 
S

Steve

Thanks to all for the suggestions -
steve

body{background-position: center;} <-- this will be centered top to bottom
and left to right
body{background-position: center top;} <--this will be centered horizontally
and aligned at top
...ect.
 

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top