Forum Moderators: not2easy

Message Too Old, No Replies

How to set multiple backgrounds in CSS3

How to control background image size

         

hojoba

9:20 am on Nov 6, 2014 (gmt 0)

10+ Year Member



Hi! Recently I have read the article about using multiple background images in CSS3. Now I know how to use it. But, how can change the size of the each implemented background image. I can't find any examples. Please, help!

[edited by: not2easy at 2:29 pm (utc) on Nov 6, 2014]
[edit reason] Compliance with Charter [/edit]

not2easy

2:34 pm on Nov 6, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Hi hojoba and welcome to the forums. Can you post the css you are using and explain about what you have tried to do to get the images to the size you want?

rainborick

3:38 pm on Nov 6, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can use the background-size property to control multiple background images using the same comma-delimited syntax, as in:

#something { background-image: url('image1.jpg'), url('image2.jpg');
background-size:100px 100px, 200px 200px; }

The background-position property works the same way, too.