|
|
Thread Tools | Display Modes |
|
#1
|
|
|
Cave canem!
|
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? |
|
|
|
|
#2
|
|
|
Cave canem!
|
Silence. Does that mean it can't be done?
__________________
If not now, when? |
|
|
|
|
#3
|
||
|
panasonikon
|
Quote:
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. |
|
|
|
||
|
#4
|
|
|
Cave canem!
|
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:
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? |
|
|
|
|
#5
|
||
|
panasonikon
|
Quote:
|
|
|
|
||
|
#6
|
|
|
panasonikon
|
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.
|
|
|
|
|
#7
|
|
|
Cave canem!
|
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? |
|
|
|
|
#8
|
||
|
I � Unicode
|
Quote:
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. |
|
|
|
||
|
#9
|
|
|
Cave canem!
|
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';
}
}
__________________
If not now, when? |
|
|
|
| Tell The World! | |
| Thread Tools | |
| Display Modes | |
|
|