English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

5 answers

HTML and CSS don't have have background size property.
CSS3 does have a background size property, but it's not supported by many browsers.

About.com offers a tutorial on how to fake a stretched background:
http://webdesign.about.com/od/css3/f/blfaqbgsize.htm

With that said, stretched backgrounds look pretty bad. The image is distorted and looks pixelated. You might consider fitting the image to an area with a matched, fixed dimension.

The background image has to be the same size as the area it is filling in order for it to consume the total object area. Set the CSS code to "background-repeat: no-repeat;" in this case.

The image will tile if you use the CSS code "background-repeat: repeat;"

To repeat the background horizontally but not vertically:
background-repeat: repeat-x;

To repeat the background vertically but not horizontally :
background-repeat: repeat-y;

2007-11-26 03:32:58 · answer #1 · answered by jdubbubble 3 · 1 0

There isn't a setting to stretch a background. There are settings to tile, tile horizontally, tile vertically and not tile, and whether it stays in position or not.

Stretching would require Javascript (or similar) to place the image behind your content and size it to the user's display.

2007-11-26 03:28:39 · answer #2 · answered by Agent Feyd 4 · 0 0

You have your answer above.
But you miss the point!
WEB RULE NUMBER ONE:
"You have 0.5 second to "catch" your visitor. More than that, and you loose him forever."
A background image (to cover the whole of the screen) will have to be bigger than the max resolution you can think of, and that makes a file (even jpeg) HUGE, that will require a long-long-long time to download.
NEVER use a background image for your "home" page (except a "color" or a very-very-very small pattern)

2007-11-26 05:19:54 · answer #3 · answered by just "JR" 7 · 0 0

because of the fact the previous guy or woman pronounced, you could basically try this by employing employing CSS. place right here interior the pinnacle tags /type

2016-09-30 04:47:01 · answer #4 · answered by ? 4 · 0 0

This will look better if you use a larger image:

body {
background-image:url(IMAGE URL);


background-repeat:no-repeat;
}

2007-11-26 04:13:24 · answer #5 · answered by eleven82_com 3 · 0 0

fedest.com, questions and answers