Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why doesnt this work, please tell me

Status
Not open for further replies.

gnibbles

Programmer
Mar 15, 2000
79
CA
BODY { background: url(images/background.gif); background-repeat: no-repeat; width:100%;height:100%}


if i take out the background-repeat: no-repeat it comes out tiled and wont fit to the screen or anything nad is driving me crazy

gnibbles
nturpin@excite.com
 
i dont think you can use width:100%;height:100% in the body style to change the height and width of the background image.

as far as i know. you cant make the images of a background bigger or smaller than they are. adam@aauser.com
 
The code you are using is trying to set the body's width and height to 100%! What about deciding on the size of your background image and then centering it on the screen with the no-repeat option set? It will be a better quality image (browser resizing does horrible things to image quality!)

background-position: center center

 
A simple solution:
Select any background with bgcolor.
Make a table.
Place the image with exactly the table cell size in the center cell by "background=URL".
A cell can be made by combining several coherent small cells.
The table size should be smaller than the smallest expected remaining screen.
---G.Hoffmann
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top