Styling individual pages
With the release of the last of the gallery templates, I want to share with you some new functionality that you can use. You can now target your style to individual templates and/or specific galleries.
To make the green text red for only the journal pages on your site you could use:
.journal .title {
color: red;
}
But remember, you don’t only have access to changing the title, you can change anything on the page that has a class or an ID, you can even target specific classes within IDs using the above method.
You can also target specific galleries now too (as well as images, keywords and dates pages) using this trick:
.gallery_417126 .title {
color: red;
}
Now pay attention to the 417126 in the code above – that is the gallery number that I want to target, so you will have to change that to match the gallery number you want to target. You can also target images, keyword and date pages. The following example text that is in all caps are variables depending on what Image# you want, or the keywords you have searched for, or the dates you have sepcified; simply swap .gallery_GALLERY# in my previous example with one of them.
.image_IMAGE#
.keyword_KEYWORDREQUEST
.date_DATESTART-DATESTOP
We can even take all of this a step further and target a specific gallery style and gallery by using this code:
.journal.gallery_417126 .title {
color: red;
}
As you can see, the new changes open up a lot of possibilites. I’d love to start seeing more examples of what is going on out there!

August 21st, 2005 at 4:18 pm
I’m going to make another push for gallery style specific changes like I did on dgrin:) The cobranding header and cobranding footer are outside of the layer with id=*insert style here*. I have adjusted my various containers (#MainContainer, #ROContainer, and #container) to match up with the smugmug style exactly. What I would really like to do is to be able to dynamically change my header, rollover, and footer width (and perhaps image) declaration in the event that the gallery style is set to smugmug small. Again, the cobranding header and footer html is outside of the div id=”elegant_small” declaration so they won’t be affected by it and therefore my header, the gray box with the dark gray border that contains everything, my footer and the #cobrand_footer and #feeds layers all are not affected by assigning a width in the properties for #elegant_small.
The solution should be relatively easy I would think. Simply attach an ID or a class to the body tag that is unique for each gallery style (in addition to the gallery id). This class or ID doesn’t even need to contain any information, I just need it so I can latch on to it.
So what do you think?
August 21st, 2005 at 6:40 pm
In the 2nd paragraph the parenthetical should be in addition to the gallery CLASS not id.
September 17th, 2005 at 7:57 am
I like the idea of gallery specific headers and footers. Any news on this, JT?