Multiple background images in css


/ Published in: CSS
Save to your folder(s)

Ever needed to use to background images in a table or div? It is possible b just using css. Although this is yet to be a standard safari will allow you to apply 2! Css backgrounds, however IE, FIRFOX and retro opera users will only see 1 !


Copy this code and paste it in your HTML
  1. @charset "utf-8";<br>
  2. /* CSS Document */
  3.  
  4.  
  5. /* Please note, this onl works in safarie */
  6. .class {
  7. background-image: url(folder-image-blue-48x48.png), url(folder-image-red-48x48.png); /* noticed i ahve supplyed two background images */
  8. background-repeat: repeat-y;/* but only one repeat method ? */
  9. background-position: top left, top right;/* and then again 2! beckground positions */
  10. width: 385px;
  11. height: 100px;
  12. border: 1px solid #000000;
  13.  
  14. }
  15. /* when only one element is specified, that element is applyed to both images. */

URL: http://www.scopesden.co.uk/code_snipit.php?id=

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.