Tips and Tricks HQ Support Portal › Forums › WP Lightbox Ultimate › Lightbox Ultimate – How do you align shortcode embed images horizontally
Tagged: adjust image css, align images horizontally, custom anchor image css, lightbox ultimate align shortcode anchor
- This topic has 6 replies, 3 voices, and was last updated 11 years, 7 months ago by wpCommerce.
-
AuthorPosts
-
July 9, 2012 at 9:07 pm #6845tk900Member
I want to align my embed images horizontally instead of vertically and with a space in between. e.g If I insert my first short code using an embed image into a post it aligns to the left now I want to insert another image with a space so that it aligns to the right of the first image.If you have a look at my post you can see how it is at the moment
[http://linkandbuild.com/jquery-lightbox]
Any ideas
Nathan
July 10, 2012 at 12:52 am #47144wpCommerceModeratorHi, you can pass an additional parameter through each shortcode. The parameter is called “class”. This is so you can specify a CSS class name in the “class” parameter and the plugin will apply the CSS defined for that class to the shortcode anchor (text or image). You can learn more about it here:
Suppose, you are using the following shortcodes:
[wp_lightbox_prettyPhoto_image link="http://www.example.com/overlay-image1.jpg" description="overlay image description goes here" source="http://www.example.com/anchor-image1.jpg" title="overlay image1 title goes here" class="my_test_class"]
[wp_lightbox_prettyPhoto_image link="http://www.example.com/overlay-image2.jpg" description="overlay image description goes here" source="http://www.example.com/anchor-image2.jpg" title="overlay image2 title goes here" class="my_test_class"]Now open the
wp_lightbox_ultimate_custom.css
file and add the definition of the CSS class you have specified in the shortcode..my_test_class
{
display:inline;
}By default each shortcode div takes the whole line. But this should allow each shortcode anchor to be embedded without a line break.
July 10, 2012 at 3:02 am #47145tk900MemberThanks will give it atry
April 23, 2013 at 9:35 pm #47146JaSchweppeMemberI’m having a similar issue with trying to get my anchor images to align horizontally using the CSS. I followed the instructions above and searched other topics in the forum to troubleshoot but am not having any luck.
Here’s my lightbox shortcode:
[wp_lightbox_fancybox_image link=”http://www.z57.com/wp-content/uploads/2013/04/Welcome-Tab-4.png” image title=”Check out this cool new feature!” source=”http://www.z57.com/wp-content/uploads/2013/04/icon-placeholder.jpg” title=”Icon” class=”lightbox_ultimate_image_anchor”]
[wp_lightbox_fancybox_image link=”http://www.z57.com/wp-content/uploads/2013/04/fb-idx-tab.png” image title=”Check out this cool new feature!” source=”http://www.z57.com/wp-content/uploads/2013/04/icon-placeholder.jpg” title=”Icon” class=”lightbox_ultimate_image_anchor”]
[wp_lightbox_fancybox_image link=”http://www.z57.com/wp-content/uploads/2013/04/FB-School-Comm-Reports-Tab.png” image title=”Check out this cool new feature!” source=”http://www.z57.com/wp-content/uploads/2013/04/icon-placeholder.jpg” title=”Icon” class=”lightbox_ultimate_image_anchor”]
[wp_lightbox_fancybox_image link=”http://www.z57.com/wp-content/uploads/2013/04/fb-recently-sold-homes-tab.png” image title=”Check out this cool new feature!” source=”http://www.z57.com/wp-content/uploads/2013/04/icon-placeholder.jpg” title=”Icon” class=”lightbox_ultimate_image_anchor”]
[wp_lightbox_fancybox_image link=”http://www.z57.com/wp-content/uploads/2013/04/FB-Site-Listings-Tab.png” image title=”Check out this cool new feature!” source=”http://www.z57.com/wp-content/uploads/2013/04/icon-placeholder.jpg” title=”Icon” class=”lightbox_ultimate_image_anchor”]
Here’s the addition I made to the lightbox CSS file:
.lightbox_ultimate_image_anchor
{
display:inline;
}
I want the images to look like this: [http://www.zpropress.com/wp-content/uploads/2013/04/example-icons.png]
I would send you a link to the site but it’s on a secure development server until launch so I’m not able to. Any help you can provide is greatly appreciated!
April 24, 2013 at 9:09 am #47147wpCommerceModeratorApril 24, 2013 at 5:06 pm #47148JaSchweppeMemberYes – I tried option 2 as well.
My shortcode:
[wp_lightbox_fancybox_image link=”http://www.z57.com/wp-content/uploads/2013/04/Welcome-Tab-4.png” image title=”Check out this cool new feature!” source=”http://www.z57.com/wp-content/uploads/2013/04/icon-placeholder.jpg” title=”Icon” class=”image_anchor_css”]
[wp_lightbox_fancybox_image link=”http://www.z57.com/wp-content/uploads/2013/04/fb-idx-tab.png” image title=”Check out this cool new feature!” source=”http://www.z57.com/wp-content/uploads/2013/04/icon-placeholder.jpg” title=”Icon” class=”image_anchor_css”]
[wp_lightbox_fancybox_image link=”http://www.z57.com/wp-content/uploads/2013/04/FB-School-Comm-Reports-Tab.png” image title=”Check out this cool new feature!” source=”http://www.z57.com/wp-content/uploads/2013/04/icon-placeholder.jpg” title=”Icon” class=”image_anchor_css”]
[wp_lightbox_fancybox_image link=”http://www.z57.com/wp-content/uploads/2013/04/fb-recently-sold-homes-tab.png” image title=”Check out this cool new feature!” source=”http://www.z57.com/wp-content/uploads/2013/04/icon-placeholder.jpg” title=”Icon” class=”image_anchor_css”]
[wp_lightbox_fancybox_image link=”http://www.z57.com/wp-content/uploads/2013/04/FB-Site-Listings-Tab.png” image title=”Check out this cool new feature!” source=”http://www.z57.com/wp-content/uploads/2013/04/icon-placeholder.jpg” title=”Icon” class=”image_anchor_css”]
Custom CSS:
.image_anchor_css
{
position:relative;
}
I’ve tried adding the custom CSS to both the lightbox ultimate CSS as well as my wordpress theme’s CSS. I’ve also tried many different CSS properties using this method to see if I could get the desired affect with no luck.
April 25, 2013 at 12:35 am #47149wpCommerceModeratorHi, please switch to the “text/html” view of your page editor and insert the shortcode like the following:
<div style="text-align:left;float:left;">
[shortcode goes here]
</div>
<div style="text-align:left;float:left;">
[shortcode goes here]
</div>
<div style="clear:both;"></div>Let me know how it goes.
-
AuthorPosts
- You must be logged in to reply to this topic.