How to position background image in bottom right corner? (CSS)

CssBackground

Css Problem Overview


I have a 500x500 px image which is set as a background image on my website (as background-image of <body>) But I need this image to be located in a bottom right corner of the webpage. How can I achieve this? (better with css method)

Thank You.

Css Solutions


Solution 1 - Css

Voilà:

body {
   background-color: #000; /*Default bg, similar to the background's base color*/
   background-image: url("bg.png");
   background-position: right bottom; /*Positioning*/
   background-repeat: no-repeat; /*Prevent showing multiple background images*/
}

The background properties can be combined together, in one background property. See also: https://developer.mozilla.org/en/CSS/background-position

Solution 2 - Css

for more exactly positioning:

      background-position: bottom 5px right 7px;

Solution 3 - Css

This should do it:

<style>
body {
	background:url(bg.jpg) fixed no-repeat bottom right;
}
</style>

http://www.w3schools.com/cssref/pr_background-position.asp

Solution 4 - Css

Did you try something like:

body {background: url('[url to your image]') no-repeat right bottom;}

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionIljaView Question on Stackoverflow
Solution 1 - CssRob WView Answer on Stackoverflow
Solution 2 - CssArthur TsidkilovView Answer on Stackoverflow
Solution 3 - Cssuser873578View Answer on Stackoverflow
Solution 4 - CssmarktView Answer on Stackoverflow