Linking CSS to web pages

General ShopSite user discussion

Linking CSS to web pages

Postby jontaco » Mon May 03, 2010 8:31 pm

I understand that in order to link a stylesheet to my site I have to include the following in my page template:

[-- INCLUDE style.css PROCESS --]

But is there any way to link my stylesheet directly using:

<LINK REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen>

or

@import url(styles.css);

One reason I ask is because I notice even though my stylesheet is "external" per say, Shopsite generates my entire stylesheet on every single page header on my site.

In other words, if you "View" the Source Code on any page at http://www.mulberrystreetgifts.com you will see the stylesheet in the header. This pretty much defeats the purpose of having external styles to begin with.

Thanks
jontaco
 
Posts: 39
Joined: Sun Apr 20, 2008 8:05 pm
Location: Huntsville, AL

Postby BFChris » Tue May 04, 2010 6:21 am

If your stylesheet doesn't contain any Shopsite template tags, you can use the normal method of linking to a stylesheet:

Code: Select all
<LINK REL=StyleSheet HREF="style.css" TYPE="text/css" MEDIA=screen>


However, if there were any template tags in the CSS file, they would not be replaced/translated during the Publish process.

What version of Shopsite do you have? I believe version 10 SP1 added the ability to upload auxiliary files like external CSS files and have them processed during a publish (hence allowing them to remain as an external file, yet still be processed for Shopsite code).
~~Barefoot Chris
--------------------------------
Barefoot Chris Web Design
www.barefootchris.net
--------------------------------
BFChris
 
Posts: 322
Joined: Mon Oct 09, 2006 3:28 pm
Location: PA


Return to User Forum

Who is online

Users browsing this forum: No registered users and 84 guests