tags:

views:

108

answers:

3

Hi Friends,

I have one question..

I am using Asp.Net C# With SQL 2005

I have one grid in that and in grid i put one image box and i want to call image from my css.

when i use ImageUrl="~/Images/delete_link_thumb.gif" at image level then image is good but when i call from css through background-image:url(images/edit_link_thumb.gif); then image display is not good

Any suggestion??

Thanks

+1  A: 

Path is the CSS is relative to where the CSS is stored in the web site.

Fabian Vilers
everything is good, even picture is coming also but it's not that perfect image which i got from Image-Url
Kartik
A: 

as Fabian mentioned, try using background-image:url(/images/edit_link_thumb.gif);

Ramesh
i am using backgroud-image but i mention that image is not their proper shape. it's coming in 3d effect i don't know why ?? it's working fine in image-url
Kartik
@kartik - Screen shot would help
Ramesh
A: 

firstly, ur referencing two different images in your question, besides that it depends on where your storing your stylesheet as it is relative to where it is in your project, try adding ../ in front of your images folder reference, like so:

url(../Images/blahblah.gif);

Wayne Austin
my friend image is coming ok but in image box X sign coming with red fore color and in background image is display
Kartik
so are you giving an html image tag a css background image? seems like thats the case? in whish case your html image src is wrong
Wayne Austin