Calling a CSS file: the XSLT way.
I said in my last post that I would show how to call CSS in our gallery. Normally when we call a CSS file we would use the standard call tag:
As per my last post, note the trailing ‘/’ which closes the link tag.
This seems to work fine as a call inside transformer.xslt on mac but causes issues on PC. Therefore we need a correct way to call our file that works on both. Here’s some sample code from the ‘RollOver’ gallery I’ve working (not completed yet-I still can’t get the first image preloaded!). This part shows the initial calls defining the Paths and the then head section, where I use
The is just there to call the javascript for this particular gallery and not needed for the CSS call. I’ve left it in for completeness in relation to the gallery I’m doing this call on.
The xsl:template that is being called to make this happen is below:
You place this code below the of the ‘index.html’ template call and above the at the end of the file. The call to ‘scrollextra.css’ is simply the filename of the CSS I’m using in this gallery.
Again hope this helps.
Get all outdoorsy with Pentax's Optio WG2 and WG2-GPS
Canon's complement of compacts
Compact cameras: down, but not out
How to use a grey card
Nikon PB4 Bellows Reborn
Worlds Fastest Camera
The New Sony NEX 7
Photojojo iPhone Telephoto Lens review — AudioCast
Photo Accessories that Fail Security Checks
My week with Q
Studio equipment buying guide for beginners
VSCO Film Studio Review
Photo Tips
Lessons in Lighting
Photographing Children in the wedding party
Cattle Country
Creative Photo Valentine Surprise
How to Use Multiple Lights for Dramatic Portraits
Making your own flash diffuser
LR4 free presets: Faded series
Using Sync for Video in Develop
A gift of flowers: unfold your senses
On Set of "Love & Robots" the Film
My Night with Ilford Galerie Gold Silk Fibre
FOTOMOTO - Why I Left











Silhouettes & Photo Contests
Cyan, not just another color
Our 26 best photo projects of 2011
Family Ties That Bind
Animal Group Portraits
A Brief History Of Light & Photography: Part 3 of 3
A Brief History Of Light & Photography: Part 2 Of 3
Lightroom Interview: Kevin Tieskoetter
Always Dream Big
Gallery: Embedded with the Territorial Army
Getty Villa Malibu — 4 Old Faces, 1 Sunken Garden — GALLERY (6 photos)
Going Fast with Light
Wildlife photography for the masses
How much should you charge for a photograph?
Santa Pictures + Marketing for your Business































Comments
href=”/test/common/css/common.css” in link tag
This work fine in all browsers but in mac causes issues on PC.
Can you please help me i am working on xml using xslt in .net
That path is an absolute one and may be what’s causing the issue.
Post new comment