5102 Posts in 1520 Topics by 1116 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1122 Views |
-
Adding Links to CSS in customised theme

12 October 2009 at 9:31am
Hi all,
I'm a new user to SS but loving it so far, it seems to be perfect for multiple sites I host.
I have started writing my current websites themes and got everything working appart from one thing;
I cannot for the life of me get it to find image links to work in the CSS, I'm pretty sure its a syntax problem..
I'm currently storing them in
theme_name/images
and addressing them in the CSS as the guide states as
background: #fff url('$ThemeDir/images/intro.jpg') no-repeat;
(for example)I was wondering if anyone could correct me on the correct way to do this please?
Thanks in advance to any help, I'm looking forward to using SS ^^
-
Re: Adding Links to CSS in customised theme

12 October 2009 at 11:06am
assuming: themes > your theme > css, images, templates
then,
background: #fff url('../images/intro.jpg') no-repeat; -
Re: Adding Links to CSS in customised theme

12 October 2009 at 2:05pm
Thanks, thats exactly what i did in the end. I'm still not sure how the tutorial intends it to work, but it works fine that way
-
Re: Adding Links to CSS in customised theme

13 October 2009 at 3:00am
Could you please point to the page of the guide stating that you can use $ThemeDir in a CSS file? I can’t believe it.
Regards,
Juan -
Re: Adding Links to CSS in customised theme

13 October 2009 at 6:44am Last edited: 13 October 2009 6:48am
There's info in the API and I just learned something new.
You can use that in your template.ss files.ThemeDir (line 859)
Returns the root directory of the theme we're working with.This can be useful for referencing images within the theme. For example, you might put a reference to <img src="$ThemeDir/images/something.gif"> in your template.
If your image is within a subtheme, such as mytheme_forum, you can set the subtheme parameter. For example, <img src="$ThemeDir(forum)/images/something.gif">
-
Re: Adding Links to CSS in customised theme

13 October 2009 at 8:02am
Yes, after a bit more learning (and developing) I now see I totally misunderstood its purpose, its for use in .ss only and not all ss files as I thought!
So the tutorial is perfect I just need my brain checking! Sorry for the false alarm
| 1122 Views | ||
|
Page:
1
|
Go to Top |


