Tips and Tricks HQ Support Portal › Forums › WP Lightbox Ultimate › Lightbox Ultimate: How to resize the anchor image
- This topic has 4 replies, 2 voices, and was last updated 12 years ago by wpCommerce.
-
AuthorPosts
-
November 18, 2012 at 11:35 pm #7946lebergeronMember
Using Lightbox Ultimate for video and PDF. Works great. See http://www.testachi.com The Click to Play and Click to Give boxes are uses of the plugin.
Being used in a sidebar widget.
Problem I have is with iPad display. Image anchor is too large and overruns the area
Is there a way for me to scale the widget code to fix display issues with mobile devices?
Here is the current widget code
[wp_lightbox_prettyPhoto_video link=”http://www.vimeo.com/51791016″ width =”512″ height = ‘384″ source=”http://testachi.com/wp-content/uploads/2012/10/ClicktoPlay.jpg” width=50% height=50% title=”Our Story”
class=”lightbox_img_frame_fancy1″]
Thanks!
November 19, 2012 at 3:29 am #51538wpCommerceModeratorHi, Are you trying to use width=50% height=50% for the anchor image [http://testachi.com/wp-content/uploads/2012/10/ClicktoPlay.jpg]? There is no shortcode parameter to do this way. If you use “width” or “height” parameter in the shortcode it will only apply to the overlay content (In this case it’s the video).
If you want to apply any HTML attribute to the anchor image you can do so by including a img_attributes parameter in the shortcode. Inside the
img_attributes
parameter you can specify the width and height for the anchor image. For example:[wp_lightbox_prettyPhoto_video link="http://www.vimeo.com/51791016" width="512" height="384" source="http://testachi.com/wp-content/uploads/2012/10/ClicktoPlay.jpg" img_attributes='width="100" height="100"' title="Our Story" class="lightbox_img_frame_fancy1"]
November 19, 2012 at 12:51 pm #51539lebergeronMemberThe widget shortcode for width, height = 50% you saw was an experiment that did not work. Thank you for looking so carefully at my question!
I tried your attributes parameter as written img_attributes=’width=”100″ height=”100″
but it did not change the anchor image size nor did =50, etc
I am using version 1.8.4 of the plugin
Your help is much appreciated
November 19, 2012 at 12:58 pm #51540lebergeronMemberUPDATE: your suggestion DOES work. I was missing an apostrophe. THANK YOU
May I use pixels and/or % of anchor size?
November 20, 2012 at 3:48 am #51541wpCommerceModeratorAny valid HTML attribute for the <img> tag should work with it (except “src” because you are already specifying it via shortcode).
-
AuthorPosts
- You must be logged in to reply to this topic.