|
Rank: Newbie Groups: Member
Joined: 7/2/2009 Posts: 3 Points: 9
|
I try to customize my css template and convert it to cuyahoga template. But I could not use "background:url(); " tag. Is there a any technical restriction to use image url in css? I check both Code:background:url(~/Templates/jet/Images/lft_pic1.gif); and Code:background:url(<%= ResolveUrl("~/Templates/jet/Images/header.gif") %>); and Code:background:url(Templates/jet/Images/header.gif); in css. Do you have any opinion?
|
|
Rank: Administration Groups: Administration
, Member
Joined: 12/30/2004 Posts: 1,674 Points: 1,824 Location: Wageningen (NL)
|
In the css you should always use relative urls to the images (relative to css file itself): Code: background: url(../images/mybg.png);
|
|
Rank: Administration Groups: Administration
, Member
Joined: 10/7/2008 Posts: 505 Points: 1,515
|
Or go from the root beginning with '/' when referencing in templates etc Code:background:url(/Templates/jet/Images/header.gif); ../ relative is what I use though.
|
|
Rank: Newbie Groups: Member
Joined: 7/2/2009 Posts: 3 Points: 9
|
martijnb wrote:In the css you should always use relative urls to the images (relative to css file itself): Code: background: url(../images/mybg.png);
yes, correct that's worked. thanks for your help
|
|
Guest |