Member
Member
os07   23-05-2008, 23:49
#1

Can individual albums be styled independently of each other with CSS? For example, could I apply one set of CSS styles to Album1 and a different set of CSS styles to Album 2?
Basic idea? How to specify different albums with CSS selectors?

Thanks!

Member
Member
macalter   24-05-2008, 00:14
#2

Yes. Keep backup of theme css to restore I use the Default Theme so from the dark.css, I created and customized each of dark1.css, dark2.css etc (named whatever you want, of course). Then using the Admin panel, select dark1.css for Album1, dark2.css for Album2, after selecting the theme. Same can be done using any of the themes.

You'll have to do experimenting to discover which selector's declaration in the css affects the different components on the pages (index, album, image). Also, when I do my nightly updates (or whatever frequency), I always do a compare of dark.css to my own version, just in case something new was added. That's not to say I change my customization!

Member
Member
os07   24-05-2008, 00:50
#3

Wow! Exactly what I had in mind. I had a look in the Admin panel - where do you select the individual css files for each album? Not immediately obvious to me - but then, nothing about ZP ever seems to be obvious to me!

BTW, the first time I used ZP for a site, I made a printout of the index, album and image pages in action and went into the CSS and made myself a labeled printout for each page with the selectors written next to their elements. Saved a LOT of headaches later!

Member
Member
macalter   24-05-2008, 02:39
#4

Good tool is your browser. Firefox (I use Mac but probably same for PC) has add-on called Firebug that allows viewing code elements. So if you need to know what the selector is for the title, it will show for example.

The Theme is set for each album under the Themes tag, of course. Then go to Options tab and select Theme Options. Select each album from the drop down menu and scroll down unti you see choice of the css options. (Keep forgetting to ask if it could be moved up on the page

Within the Default theme is a folder /styles. ZP's css files are there. Clone whichever you wish and give it a name. Go to the Admin panel and it'll show up as one of the selections (make sure the page was refreshed.)

I use my FTP application to view the css file live and modify on the fly editing with BBEdit. An HTML/CSS editor is, IMHO, extremely better than plain text editor. Every time I change it and save, I refresh the screen showing the php page to reflect changes.

Take your time. Record your changes as you go to reflect what it modifies. So, if you change #FFFFFF for the gallery title to #000000, add / this changes the gallery title /. That way, when you want to create the next css for Album2, you know what to modify. And, make sure your css is valid, of course.

Administrator
Administrator
acrylian   24-05-2008, 08:45
#5

osO7: you can't select individual css for individual albums. You can do that with php with something like if(getAlbumTitle() === "") { print link to cssfile of album }etc (not a working code example of course).
Or even easier name the css selector like you albums and you can do something like `class='".

Member
Member
macalter   24-05-2008, 15:33
#6

acrylian: I have a different css file for each of my albums. They're all contained within one Default Theme /styles in order to use the same index/album/image.php pages. My Gallery page is separate as it contains custom lines for the index.php page and different css. So, not sure why you say it cannot be done.

Member
Member
sbillard   24-05-2008, 15:48
#7

You can select a different theme for each album on the album admin pannel. Then on the theme options pannel you can select the album for which you want to set the theme options. There you select the css.

Administrator
Administrator
acrylian   25-05-2008, 09:56
#8

Macalter: I did not say that it can't be done. What I thought os07 had in mind was a simple admin option to do this. So I suggested that the easiest would be to use "album themes".

Member
Member
os07   27-05-2008, 14:40
#9

Thanks to all for help in figuring this out. I do not have any theme options in my album admin panel! Also, I am using the default theme; when I click on the themes tab in the admin panel, nothing happens! Do I have a corrupt install? ZP 1.15 dated 5/6/08.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.