PDA

View Full Version : Two images in the background.



Yashik.San
14th Nov 2011, 11:59 am
In my design I want to put two images on the background of my page. One is to be on the left top of the page, and second one respectively on the right. And images do not change their position if to resize the window. Of course in the preview was displayed only one image. I've tried to find some hints online, but was only able to get solutions for HTML 4.01 and it did't work for our XHTML 1.0 (one image in html selector and another one in body selector).
Please, could anyone provide me with right solution for this.

David
14th Nov 2011, 01:48 pm
The traditional method is to use nested divs because each element can only have a single background image in CSS 2.1. However, CSS3 does allow for multiple background images. See here: http://www.css3.info/preview/multiple-backgrounds/ The problem with this is that support is poor for IE. Only IE9 supports this CSS3 feature.