Thread: CSS Sprites

Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Location
    Roseville, Michigan
    Posts
    188
    Plugin Contributions
    0

    Default CSS Sprites

    How do you add a css sprites image in zencart for the background images?

  2. #2
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: CSS Sprites

    I would image the same way you would for any similar type image.

  3. #3
    Join Date
    Jul 2007
    Location
    Roseville, Michigan
    Posts
    188
    Plugin Contributions
    0

    Default Re: CSS Sprites

    Do you do anything to the php file to call out the css sprite image?

  4. #4
    Join Date
    Jul 2007
    Location
    Roseville, Michigan
    Posts
    188
    Plugin Contributions
    0

    Default Re: CSS Sprites

    I'm trying to add a css sprite to my drop shadow.

    tpl_header:
    PHP Code:
    <!-- divs for drop shadow -->
    <
    div id="nw"><div id="ne"><div id="se"><div id="sw"><div id="n"><div id="s"><div id="w"><div id="e"><div id="main"><table id="workaround"><tr><td>
    <
    div id="headerWrapper"
    tpl_footer:
    PHP Code:
    <!--closting divs for drop shadow -->
    </
    td></tr></table></div></div></div></div></div></div></div></div></div
    Here is my CSS

    Code:
    /*drop shadows section */
    * html #nw, * html #ne, * html #se, * html #sw, * html #n, * html #s, * html #w, * html #e {background:none!important;}
    
    #nw {
      	background: url("../images/shadow_nw.png") top left no-repeat;
    	}
    	
    #ne {
      	background: url("../images/shadow_ne.png") top right no-repeat;
    	}
    	
    #se {
      	background: url("../images/shadow_se.png") bottom right no-repeat;
    	}
    
    #sw {
      	background: url("../images/shadow_sw.png") bottom left no-repeat;
      	padding:0 10px ; /* border thickness */
    	}
    
    #n {
      	background: url("../images/shadow_n.png") top repeat-x;
    	}
    	
    #s {
      	background: url("../images/shadow_s.png") bottom repeat-x;
      	padding-bottom: 10px; /* border thickness */
    	padding-top: 10px; /* border thickness */
    	}
    
    #w {
      	background: url("../images/shadow_w.png") left repeat-y;
      	margin-left: -10px; /* border thickness */
      	margin-right: -10px; /* border thickness */
    	}
    
    #e {
      	background: url("../images/shadow_e.png") right repeat-y;
    	}
    	
    #main {
      	margin-right: 10px; /* border thickness */
      	margin-left: 10px; /* border thickness */
    	}
    
    table#workaround {
      	margin: 0;
      	border: 0;
      	border-collapse: collapse;
    	width:100%
    	}
    
    table#workaround td {
        padding:0;
        margin:0;
    }

  5. #5
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: CSS Sprites

    Quote Originally Posted by smoke133 View Post
    I'm trying to add a css sprite to my drop shadow.
    shadow_nw.png is your css sprite.

    For more information - google css sprites

 

 

Similar Threads

  1. CSS Sprites?
    By Ogran in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 27 Feb 2015, 01:40 AM
  2. v151 How to uninstall CSS Horizontal Drop Down Menu (CSS Flyout Header 1.5)
    By cmike in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 Feb 2014, 07:39 AM
  3. css horizonal navigational menu with sprites
    By jim23866 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 Oct 2010, 02:42 AM
  4. want to reposition an image using css. what is css to control this?
    By what44 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 10 Nov 2007, 05:03 AM
  5. how to insert css buttons created with CSS Tab Designer 2?
    By lankeeyankee in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 24 Mar 2007, 08:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg