开发者

asp.net background-image control

When I p开发者_如何学编程ut background-image: url() in to .css , browser doesnt put that image in that postition, but when i write that command in .aspx i get the image. Why it cant to call image from .css , i am making few themes so i have in every theme one .css and in each i want to have other header pict for example.


When you use pict/logo.jpg in your .css file, this is relative to the location of the .css file, not the file it's included in. If you put it in your .aspx, it's relative to the .aspx. You probably just need /pict/logo.jpg

See this previous question:

Using relative URL in CSS file, what location is it relative to?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜