• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug Customization Forcing alignment of particular journal photos

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 Jul-07-2006, 10:51 AM
#1
rutt is offline rutt OP
Cave canem!
rutt's Avatar
Forcing alignment of particular journal photos
Probably this is a FAQ, but I did some searching and didn't find it.

Is there a way to force particular journal photos to align to particular sides? Is there a way to force them all left or right?
__________________
If not now, when?
Old Jul-08-2006, 04:43 AM
#2
rutt is offline rutt OP
Cave canem!
rutt's Avatar
Silence. Does that mean it can't be done?
__________________
If not now, when?
Old Jul-08-2006, 06:03 AM
#3
Andy is offline Andy
panasonikon
Andy's Avatar
Quote:
Originally Posted by rutt
Silence. Does that mean it can't be done?
No, it means we didn't see it.

Give me a link please, to a particular journal photo you want to align, and how you want them aligned. We need a link so we can try out various things.
__________________
Andy
Moon River PhotographyWorkshopsGoogle+FacebookTwitter
Old Jul-08-2006, 06:20 AM
#4
rutt is offline rutt OP
Cave canem!
rutt's Avatar
The normal behavior is to alternate, starting with left alignment of the image and right alignment of the caption.

There are three different things I'd like to be able to do:
  1. Force a single arbitrary journal entry left or right regardless of the alignment of the previous and next entries, which retain their normal alignments.
  2. Force all the journal entries for a particular gallery to be either left or right.
  3. Force the first entry to start left or right with succeeding entries alternating from there.

I'm not sure it really matters which journal gallery you use for this. If I knew how to do this stuff for any journal gallery, I think I could figure out how to apply to my cases. If you want one to play with, though, here it is.
__________________
If not now, when?
Old Jul-08-2006, 06:32 AM
#5
Andy is offline Andy
panasonikon
Andy's Avatar
Quote:
Originally Posted by rutt
The normal behavior is to alternate, starting with left alignment of the image and right alignment of the caption.

There are three different things I'd like to be able to do:
  1. Force a single arbitrary journal entry left or right regardless of the alignment of the previous and next entries, which retain their normal alignments.
  2. Force all the journal entries for a particular gallery to be either left or right.
  3. Force the first entry to start left or right with succeeding entries alternating from there.

I'm not sure it really matters which journal gallery you use for this. If I knew how to do this stuff for any journal gallery, I think I could figure out how to apply to my cases. If you want one to play with, though, here it is.
I was messing with it, not able to figure it out yet. I'm fairly certain it can be done - but we need greater CSS minds than me. Stay tuned.
__________________
Andy
Moon River PhotographyWorkshopsGoogle+FacebookTwitter
Old Jul-08-2006, 08:59 AM
#6
Andy is offline Andy
panasonikon
Andy's Avatar
John,

this does the trick (thanks JT!)

.journal_entry div.left {
float: right !important;
}

can also be

.gallery_XXXXXX .journal_entry div.left {
float: right !important;
}

for a specific gallery.

__________________
Andy
Moon River PhotographyWorkshopsGoogle+FacebookTwitter
Old Jul-08-2006, 11:22 AM
#7
rutt is offline rutt OP
Cave canem!
rutt's Avatar
I see how this can force all the images in all journals right or left. I see how it can force all the images in a particular journal right or left. But what about control over individual images? Can I get the first two (say) to align left and the next two (say) right, &etc?
__________________
If not now, when?
Old Jul-08-2006, 11:38 AM
#8
Mike Lane is offline Mike Lane
I � Unicode
Mike Lane's Avatar
Quote:
Originally Posted by rutt
I see how this can force all the images in all journals right or left. I see how it can force all the images in a particular journal right or left. But what about control over individual images? Can I get the first two (say) to align left and the next two (say) right, &etc?
Not with CSS as the journal gallery is currently set up. The div.photo contains the img that has an id of image_XXXXXXXX inside of it. If you float the img#image_XXXXXXXX to the opposite side you will end up with the div.photo stretching across the div.journal_entry which means the text will fall below the image (instead of wrapping around it starting at the top). Try it yourself and see what I mean.

If we could get it changed so the div.photo also includes a class of image_XXXXXXXX (or something else unique to that image) then what you are asking for could be done easily. If you used javascript to add a class to the div.photos in the journal style that corresponded to the unique image number (which can be pulled - I assume - from the ID of the contained image's ID) then you can use CSS to manipulate it as well. There may be far easier ways to do it with JS that I'm not aware of though. Point is that all the information you'd need should be in the source, it's just not in there in such a way as to be useable to do what you want with CSS.
__________________
Y'all don't want to hear me, you just want to dance.

http://photos.mikelanestudios.com/

Last edited by Mike Lane; Jul-08-2006 at 11:59 AM.
Old Jul-08-2006, 01:27 PM
#9
rutt is offline rutt OP
Cave canem!
rutt's Avatar
Thanks, Mike! Those ruby slippers were there all the time.

Turns out this little code snippet will force all the photos in a journal gallery to align right:

Code:
  var divs = document.getElementsByTagName('DIV');
  for (var i=0; i<divs.length; i++) {
    if (divs[i].className == 'photo left') {
      divs[i].className = 'photo right';
    }
  }
With that little piece of information, well away we go. Perhaps I'll add something to the journal hack to allow fine grained control over alignment, just the way it already allows photos to be sized individually or by gallery. Now that I have the low level tool, the rest is just play.
__________________
If not now, when?
Tell The World!  

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