How do you position a background image inside a <div>?

Posted by Giffyguy on Stack Overflow See other posts from Stack Overflow or by Giffyguy
Published on 2010-03-27T18:11:08Z Indexed on 2010/03/27 18:13 UTC
Read the original article Hit count: 424

My code currently looks like this:

<div style="position: fixed; width: 35.25%; height: 6.75%;
    left: 0%; top: 4.625%; right: 64.75%; bottom: 88.625%;
    color: #D1E231; text-align: center; background-color: #666666;
    background-image: url('FleurTR.png'); background-position: right top;">
<div>

The <div> shows up just fine, with the grey background color, but the background image won't show up at all. What am I missing here? There's no reason I should have to specify background-attachment or background-repeat, right? (I don't want it to repeat.)

© Stack Overflow or respective owner

Related posts about css

Related posts about css-positioning