LostInNetwork
Member
Posted 5 years ago #
I can embed Gallery2 pics on static pages using the wpg2 plugin. If I however right click the image and set any alignment (e.g. left aligned or any other), then the image gets properly aligned UNTIL I save. If I save, save and continue editing, or switch to HTML/code view, the alignment is lost. What's wrong?
WP 2.2.2, Gallery2 2.2.2, WPG2 2.13
LostInNetwork
Member
Posted 5 years ago #
This code does not work:
<p align="justify">
<div class="g2image_float_left">
<wpg2id>7</wpg2id>
</div>
One chapter of text
</p>
No float. The image gets placed above the text.
Any ideas?
Have you added the g2image_float_left class to your css. Or have you included the wpg2 styles.
LostInNetwork
Member
Posted 5 years ago #
No. And no. Was that something I was supposed to do? I just installed wpg2 to plugins and activated/validated it...
Just now found this: "The g2image classes must be implemented in your style.css for the alignment classes to be effective."
How do I do this? I have now added into my themes css file:
.g2image_float_left {
float: left;
}
Doesn't seem to work. I'm no xhtml/css wizard.
LostInNetwork
Member
Posted 5 years ago #
Hey, this works!
- I copied the alignment classes to the themes style.css: I did cut and paste normal/float/centered class definitions from here: http://www.galleryembedded.com/forums/viewtopic.php?t=2108
- then I just needed to type:
<div class="g2image_float_left"><wpg2id>95</wpg2id></div>
<p align="justify">text</p>
... and it works. I just had to sort out that html...
THANKS A MILLION!
ps. TinyMCE Advanced sucks (but it has a character map and full justification). That "Code" tab is Good to have. Without it, I wouldn't have been able to achieve this left-float, I guess.