Lunarpages Web Hosting Forum

Author Topic: CSS Background Trick  (Read 2868 times)

Offline bryanbell

  • Spaceship Captain
  • *****
  • Posts: 110
CSS Background Trick
« on: February 08, 2012, 02:21:32 AM »
In one div display two background images stacked next to each other or on top of then the following code will help you.

Following code for vertically stacked two images

Code: [Select]
background:url(http://yourwebsite.com/images/image1.png) no-repeat, url(http://yourwebsite.com/images/image2.png) repeat-y;
Following code for horizontally stacked two images

Code: [Select]
background:url(http://yourwebsite.com/images/image1.png) repeat-y, url(http://yourwebsite.com/images/image2.png) repeat;
« Last Edit: September 12, 2012, 11:05:43 PM by bryanbell »
SPINX Inc. Leading Florida Web Design Company,
http://www.lunarpages.com/

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6427
Re: CSS Background Trick
« Reply #1 on: February 08, 2012, 06:10:50 AM »
Is this officially supported by CSS? Have you tried this on multiple browsers? It might be a fluke that one browser permits this.

Is that a repeat-y or a repeat-x in the horizontal layout?
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-

Offline pavel

  • Spacescooter Operator
  • *****
  • Posts: 30
Re: CSS Background Trick
« Reply #2 on: September 24, 2012, 03:58:49 AM »
I have tried this one but no luck.

Thanks