• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug Customization Subcategories: Centering Gallery Thumbnails

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #128 (Sunrise or Sunset), ShootingStar.

The next Dgrin Challenge DSS #129 (Silhouette Revisited ) is open for entries through May 27th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Old Aug-10-2012, 05:53 AM
#1
Ogre is offline Ogre OP
Big grins
Subcategories: Centering Gallery Thumbnails
Hello,

I recently created a subcategory for the my travel category. I am interested in finding out how I can center the gallery thumbnails Below is the linke to the travel subcategories:

http://www.jamesreiningerphotography.com/Travel

Any help would be greatly appreciated.

Thanks,

James
Old Aug-10-2012, 06:01 AM
#2
Allen is offline Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by Ogre View Post
Hello,

I recently created a subcategory for the my travel category. I am interested in finding out how I can center the gallery thumbnails Below is the linke to the travel subcategories:

http://www.jamesreiningerphotography.com/Travel

Any help would be greatly appreciated.

Thanks,

James
Manually centering thumbs is done by playing mainly with the R/L margins in the CSS below.
.miniBox acts on thumbs 100x100 and .boxBottom .albumLarge acts on 150x150 size thumbs.
Code:
.miniBox {width:122px; text-align:center; height:210px; margin:0 26px;}
  .miniBox .photo {float:none; width:122px; height:auto; _height:1px;}
  .miniBox .albumTitle {width:122px;}
  .miniBox .description {width:122px;}
  .miniBox .updated {width:122px;}

.loggedIn .miniBox {height:auto; min-height:300px;}
  .loggedIn .miniBox .smbuttons {margin:0 auto; width:122px;}
  .loggedIn .miniBox input {width:122px;}
  .loggedIn .miniBox textarea {width:112px;}

.boxBottom .albumLarge {width:192px; height:350px; text-align:center; margin:0 24px;}
  .category_Travel .boxBottom .albumLarge {margin:20px 4px 0;}
  .albumLarge .photoLarge {float:none; width:192px; height:auto; _height:1px;}
  .albumLarge .albumTitle {width:192px;}
  .albumLarge .description {width:192px;}
  .albumLarge .updated {width:192px;}

.loggedIn .boxBottom .albumLarge {height:auto; min-height:450px;}
  .loggedIn .albumLarge .smbuttons {margin:0 auto; width:192px;}
  .loggedIn .albumLarge input {width:192px;}
  .loggedIn .albumLarge textarea {width:182px;}
BUT, your pages stretch so it would be impossible to center them because thumbs always fill from
the left. You'd have to set a static page width. Also every page might have a different number of
thumbs so each specific cat/sub-cat page would need to be specifically set.
Old Aug-10-2012, 08:30 AM
#3
Ogre is offline Ogre OP
Big grins
Quote:
Originally Posted by Allen View Post
Manually centering thumbs is done by playing mainly with the R/L margins in the CSS below.
.miniBox acts on thumbs 100x100 and .boxBottom .albumLarge acts on 150x150 size thumbs.
Code:
.miniBox {width:122px; text-align:center; height:210px; margin:0 26px;}
  .miniBox .photo {float:none; width:122px; height:auto; _height:1px;}
  .miniBox .albumTitle {width:122px;}
  .miniBox .description {width:122px;}
  .miniBox .updated {width:122px;}
 
.loggedIn .miniBox {height:auto; min-height:300px;}
  .loggedIn .miniBox .smbuttons {margin:0 auto; width:122px;}
  .loggedIn .miniBox input {width:122px;}
  .loggedIn .miniBox textarea {width:112px;}
 
.boxBottom .albumLarge {width:192px; height:350px; text-align:center; margin:0 24px;}
  .category_Travel .boxBottom .albumLarge {margin:20px 4px 0;}
  .albumLarge .photoLarge {float:none; width:192px; height:auto; _height:1px;}
  .albumLarge .albumTitle {width:192px;}
  .albumLarge .description {width:192px;}
  .albumLarge .updated {width:192px;}
 
.loggedIn .boxBottom .albumLarge {height:auto; min-height:450px;}
  .loggedIn .albumLarge .smbuttons {margin:0 auto; width:192px;}
  .loggedIn .albumLarge input {width:192px;}
  .loggedIn .albumLarge textarea {width:182px;}
BUT, your pages stretch so it would be impossible to center them because thumbs always fill from
the left. You'd have to set a static page width. Also every page might have a different number of
thumbs so each specific cat/sub-cat page would need to be specifically set.

Hmmm.... So if I wanted to center the gallery thumbnails for each category and subcategory, I would need to do seperate coding for each cat/subcategory screen?

Does that slow down loading time?

I also assuming that if were to add a new gallery to any cat/subcategory, I would also need to redo the coding for that screen??

Thanks,


James
Old Aug-10-2012, 09:05 AM
#4
Allen is offline Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by Ogre View Post
Hmmm.... So if I wanted to center the gallery thumbnails for each category and subcategory, I would need to do seperate coding for each cat/subcategory screen?

Does that slow down loading time?

I also assuming that if were to add a new gallery to any cat/subcategory, I would also need to redo the coding for that screen??

Thanks,


James
You would set one static width for all cat/subcats something like maybe between 800 > 900 then
adjust margins for a filled row. The last non-filled row will be left justified. See example here and click
the different months upper right.

I have the hack "make all thumbs 150x150" and it does slightly slow thumbs loading but it's well worth
not seeing any 100x100 thumbs on a page with less then six thumbs.
Old Aug-10-2012, 09:15 AM
#5
Ogre is offline Ogre OP
Big grins
Quote:
Originally Posted by Allen View Post
You would set one static width for all cat/subcats something like maybe between 800 > 900 then
adjust margins for a filled row. The last non-filled row will be left justified. See example here and click
the different months upper right.

I have the hack "make all thumbs 150x150" and it does slightly slow thumbs loading but it's well worth
not seeing any 100x100 thumbs on a page with less then six thumbs.

Ok, I am not a CSS expert. How do you set up static width? And if I were to do this, would it negatively effect how these screens load on my customers computers- ie appearing fine on some, but "goofy" on others.

James
Old Aug-10-2012, 10:17 AM
#6
Allen is offline Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by Ogre View Post
Ok, I am not a CSS expert. How do you set up static width? And if I were to do this, would it negatively effect how these screens load on my customers computers- ie appearing fine on some, but "goofy" on others.

James
All computers should look the same. Some screens might require side scrolling if not wide enough.
These are all the rules in my CSS effecting the width of the thumbs boxes. It is fine tuned for my site.
It should give you an idea of the coding needed.
Code:
.boxBottom .albumLarge {width:172px !important; height:240px; text-align:center; margin:0 5px;}
    #content.shareHomepage .boxBottom .albumLarge {margin:0 5px;}
    #featuredBox           .boxBottom .albumLarge {margin:10px 1.5px 0;}
.boxBottom .albumLarge .albumTitle {width:172px;}
.albumLarge .photoLarge {float:none; width:172px !important; height:auto; _height:1px;}
.albumLarge .updated {width:172px !important;}


#category.category  {
    width: 990px !important;
    margin: 60px auto 0;
}

#category.subcategory #galleriesBox {
    width: 958px !important;
    margin: 0 auto;
    padding-top: 10px;
}

#category.subcategory  {
    width: 990px !important;
    margin: 60px auto 0;
}

#category.subcategory #galleriesBox .boxBottom {
    padding-top: 30px;
}
Old Aug-10-2012, 10:44 AM
#7
Ogre is offline Ogre OP
Big grins
Quote:
Originally Posted by Allen View Post
All computers should look the same. Some screens might require side scrolling if not wide enough.
These are all the rules in my CSS effecting the width of the thumbs boxes. It is fine tuned for my site.
It should give you an idea of the coding needed.
Code:
.boxBottom .albumLarge {width:172px !important; height:240px; text-align:center; margin:0 5px;}
    #content.shareHomepage .boxBottom .albumLarge {margin:0 5px;}
    #featuredBox           .boxBottom .albumLarge {margin:10px 1.5px 0;}
.boxBottom .albumLarge .albumTitle {width:172px;}
.albumLarge .photoLarge {float:none; width:172px !important; height:auto; _height:1px;}
.albumLarge .updated {width:172px !important;}
 
 
#category.category  {
    width: 990px !important;
    margin: 60px auto 0;
}
 
#category.subcategory #galleriesBox {
    width: 958px !important;
    margin: 0 auto;
    padding-top: 10px;
}
 
#category.subcategory  {
    width: 990px !important;
    margin: 60px auto 0;
}
 
#category.subcategory #galleriesBox .boxBottom {
    padding-top: 30px;
}

Thanks Allen! Now, how do I get the text back underneath the thumbnails?

James
Old Aug-10-2012, 11:22 AM
#8
Allen is offline Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by Ogre View Post
Thanks Allen! Now, how do I get the text back underneath the thumbnails?

James
You seem to have lost the rest of the CSS.
Code:
/* == FAQ #18, Line up boxes with titles underneath === */
/* ============== Current as of 13 Feb 07 ============= */
/* ==================================================== */

.miniBox {width:122px; text-align:center; height:210px; margin:0 28px;}
  .miniBox .photo {float:none; width:122px; height:auto; _height:1px;}
  .miniBox .albumTitle {width:122px;}
  .miniBox .description {width:122px;}
  .miniBox .updated {width:122px;}

.loggedIn .miniBox {height:auto; min-height:300px;}
  .loggedIn .miniBox .smbuttons {margin:0 auto; width:122px;}
  .loggedIn .miniBox input {width:122px;}
  .loggedIn .miniBox textarea {width:112px;}

.boxBottom .albumLarge {width:172px !important; height:240px; text-align:center; margin:0 5px;}
    #content.shareHomepage .boxBottom .albumLarge {margin:0 5px;}
    #featuredBox           .boxBottom .albumLarge {margin:10px 1.5px 0;}
.boxBottom .albumLarge .albumTitle {width:172px;}
.albumLarge .photoLarge {float:none; width:172px !important; height:auto; _height:1px;}
.albumLarge .updated {width:172px !important;}

.loggedIn .boxBottom .albumLarge {height:auto; min-height:450px;}
  .loggedIn .albumLarge .smbuttons {margin:0 auto; width:192px;}
  .loggedIn .albumLarge input {width:192px;}
  .loggedIn .albumLarge textarea {width:182px;}
Check out this thread to make all thumbs 150x150.
http://www.dgrin.com/showthread.php?t=207570
Old Aug-10-2012, 12:25 PM
#9
Ogre is offline Ogre OP
Big grins
Quote:
Originally Posted by Allen View Post
You seem to have lost the rest of the CSS.
Code:
/* == FAQ #18, Line up boxes with titles underneath === */
/* ============== Current as of 13 Feb 07 ============= */
/* ==================================================== */
 
.miniBox {width:122px; text-align:center; height:210px; margin:0 28px;}
 .miniBox .photo {float:none; width:122px; height:auto; _height:1px;}
 .miniBox .albumTitle {width:122px;}
 .miniBox .description {width:122px;}
 .miniBox .updated {width:122px;}
 
.loggedIn .miniBox {height:auto; min-height:300px;}
 .loggedIn .miniBox .smbuttons {margin:0 auto; width:122px;}
 .loggedIn .miniBox input {width:122px;}
 .loggedIn .miniBox textarea {width:112px;}
 
.boxBottom .albumLarge {width:172px !important; height:240px; text-align:center; margin:0 5px;}
    #content.shareHomepage .boxBottom .albumLarge {margin:0 5px;}
    #featuredBox           .boxBottom .albumLarge {margin:10px 1.5px 0;}
.boxBottom .albumLarge .albumTitle {width:172px;}
.albumLarge .photoLarge {float:none; width:172px !important; height:auto; _height:1px;}
.albumLarge .updated {width:172px !important;}
 
.loggedIn .boxBottom .albumLarge {height:auto; min-height:450px;}
 .loggedIn .albumLarge .smbuttons {margin:0 auto; width:192px;}
 .loggedIn .albumLarge input {width:192px;}
 .loggedIn .albumLarge textarea {width:182px;}
Check out this thread to make all thumbs 150x150.
http://www.dgrin.com/showthread.php?t=207570

Thanks again Allen! However, since each of cat/subcategories have different amount of galleries in them, it appears I need write a separate line of coding for each.

I am curious. Is there way to set up margins depending on the number galleries?

James
Old Aug-10-2012, 01:36 PM
#10
Smug Eric is offline Smug Eric
Smug Hero
Smug Eric's Avatar
I don't think there is a way to code it to detect the number of galleries and have it adjust the width based on that.
__________________
Eric
Support Hero and Customeister
http://www.smugmug.com/help
Old Aug-11-2012, 09:03 AM
#11
Ogre is offline Ogre OP
Big grins
Quote:
Originally Posted by Smug Eric View Post
I don't think there is a way to code it to detect the number of galleries and have it adjust the width based on that.

Thank you Allen and Eric for your help. Cat/Subcategory screens look much better now. I have a few more issues I want to address. However, if I need help, I will generate a new thread.

James
Tell The World!  
Tags
galleries , subcategories
Similar Threads Thread Starter Forum Replies Last Post
Thumbnails in Gallery Alexandra88 SmugMug Customization 1 Jul-23-2012 09:26 AM
Category & Gallery Thumbnails dhp SmugMug Customization 1 Feb-24-2012 04:43 AM
How to display all the thumbnails from a gallery on the homepage? lise SmugMug Customization 0 Jan-16-2012 07:36 PM
Switching from regular gallery thumbnails back to square sizes does not work? Mariana Bug Reporting 1 Dec-11-2011 05:54 AM
Gallery Square Thumbnails...NOT MomaZunk SmugMug Customization 2 Sep-15-2010 03:22 PM


Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump