Glom Posted May 13, 2006 Share Posted May 13, 2006 I want to put a background picture in a particular container in my template (done using css of course!). I can centre it fine in the container, but I want the unused space in the container to contain be a certain colour. I tried specifying it the old fashioned way. #title { background-color:#000000; background:url("img/title.jpg") no-repeat center; color:#000000; height:100px; margin-left:100px; } I've specified a background colour and a background image. But the result is that the picture is centred while the rest of the container retains the colour of the parent.How do I get it so I can get the background colour and the background image to work? Link to comment Share on other sites More sharing options...
skym Posted May 14, 2006 Share Posted May 14, 2006 #title { background: #000000 url("img/title.jpg") no-repeat center; color:#000000; height:100px; margin-left:100px; } Link to comment Share on other sites More sharing options...
Glom Posted May 14, 2006 Author Share Posted May 14, 2006 Ah yes. That worked great, thanks. It's obvious when you think about it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now