Background position, margin-top?

0

Issue

I currently have my background set to top right as:

#thedivstatus {
    background-image: url("imagestatus.gif");
    background-position: right top;
    background-repeat: no-repeat;
}

BUT! I need to add a margin-top:50px; from where its rendering via above. Could anyone give me a suggestion?

Thanks

Solution

If you mean you want the background image itself to be offset by 50 pixels from the top, like a background margin, then just switch out the top for 50px and you’re set.

#thedivstatus {
    background-image: url("imagestatus.gif");
    background-position: right 50px;
    background-repeat: no-repeat;
}

Answered By – BoltClock

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More