Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# kuduk 7/2/2009 4:31 PM
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
background:url(~/Templates/jet/Images/lft_pic1.gif);
and
background:url(<%= ResolveUrl("~/Templates/jet/Images/header.gif") %>);
and
background:url(Templates/jet/Images/header.gif);
in css.

Do you have any opinion?

# martijnb 7/2/2009 8:23 PM
In the css you should always use relative urls to the images (relative to css file itself):
background: url(../images/mybg.png);
# Constructor 7/2/2009 9:52 PM (edited 7/2/2009 9:54 PM)
Or go from the root beginning with '/' when referencing in templates etc
background:url(/Templates/jet/Images/header.gif);

../ relative is what I use though.
# kuduk 7/3/2009 11:07 AM
martijnbIn the css you should always use relative urls to the images (relative to css file itself):
background: url(../images/mybg.png);


yes, correct that's worked. thanks for your help