Posts tagged as:

Results for css background

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

In this tutorial, we will see how to use a single background image applied to a button to create its 3 states normal, hover and selected.

This method allows to have a single image loaded and available right from the start instead of having more images (one per state) loaded only once called and causing a blink during the changes.

The idea will be realized using the css property background, moving the background image with the value top, center and bottom.
Continue to read >>

{ 4 comments }

4 comments

Stay updated with our RSS Feed

Thanks to the css property z-index, we can easily add a flash background (swf) to an html element.

The basic steps to add an swf as background are…

To the div container which holds both swf then the other html element:

  • the width and height of the main div container
  • the position:relative; to allow to position the swf in a absolute mode in relation to its container

Continue to read >>

{ 10 comments }

10 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