Reputation: 401
I have the following css on an element in my html. It centers the image horizontally but its not at the bottom of the page where i need it to be. How do i change this css to keep it centered horizontally but make it position: fixed to the bottom?
background: url(loginv1.png)50% 50% no-repeat;
background-size: 75px 25px;
height: 40px;
width: 120px;
display: block;
margin: 0 auto;
Upvotes: 1
Views: 78
Reputation: 2878
div {
background: url(http://snag.gy/z01qo.jpg) 50% 50%/75px 25px no-repeat;
height:40px;
width:120px;
position:fixed;
bottom:0;
left:50%;
margin-left:-60px;
}
Upvotes: 1
Reputation: 10618
Try this:
background: url("loginv1.png") center bottom no-repeat;
This will place the background image at the center horizontally, and at the bottom vertically.
Upvotes: 1