prateek
prateek

Reputation: 57

sprite images css

earlier i used to call images like this..

<asp:Image runat="server" SkinID="contanerLeftcor" ID="ContLeftCor" />

with contanerLeftcor contains the path of the image in a skin file..

now..

i have create a sprite image of all the images being used..

and i have css class like this..

.sprite-contaner-left-cor{background: url(csg-4d41213d57346.jpg) no-repeat top left;
  background-position: -480px -1792px; width: 14px; height: 29px; }

how do i call my image now?

Upvotes: 1

Views: 338

Answers (1)

scripni
scripni

Reputation: 2164

Just set the CssClass property of the image.

<asp:Image runat="server" CssClass="sprite-contaner-left-cor" ID="ContLeftCor" />

Upvotes: 2

Related Questions