Posts tagged as:

Results for css background image

100 percent background image in css

Wednesday 04 February 09 by Onsitus in CSS Tips

With a few lines of css, we can apply a background image re-sizable at 100% with the browser’s windows.

Both the body of the page then the background image (with id=”"background") have a width and height of 100%.
Their margins and paddings are imposted to null to avoid a white space around them.

With the css property overflow, we avoid that the lateral scrollbar of the browser’s window is displayed.
Finally, the background image is positioned in a absolute way to remove it from the natural flux of the page and to allow it to be re-dimensioned correctly.

Continue to read >>

{ 6 comments }

6 comments

Stay updated with our RSS Feed

The css property background allows to personalize the background of a selected element with a color (background-color) or an image (background-image).

This image can be then duplicated or not (background-repeat), positioned (background-position) and be scrollable or not with the page body (background-attachment).

Continue to read >>

{ 8 comments }

8 comments

Stay updated with our RSS Feed