Tips and Tricks HQ Support Portal › Forums › WP Lightbox Ultimate › WP Lightbox Ultimate – Align Shortcode Anchor to the Center of the Page
- This topic has 9 replies, 4 voices, and was last updated 11 years, 4 months ago by wpCommerce.
-
AuthorPosts
-
May 4, 2012 at 7:43 pm #6237bvoseMember
Hello,
I recently followed the WP Lightbox tutorial by Kirk and after he entered the short code for adding an image/video to a post, he centered the code in the visual tab of the editing page and when he refreshed his site, the image was centered on the post. When I tried that, the image remained left aligned. I deactivated all other plug-ins to find out if something else may have been interfering, but the image remained left aligned. I even created both a new page and new post, just to make sure there was nothing hidden. Here is the page on my site, [http://www.brianvose.com/cade-baccus/]
Please check the issue and offer any advice when you get the chance, you time with this issue is appreciated. If you need any other information, please let me know.
Thank You,
Brian
May 5, 2012 at 1:02 am #44746wpCommerceModeratorHi, try using CSS to see if it works – https://support.tipsandtricks-hq.com/forums/topic/lightbox-ultimate-how-to-add-css-styles-to-a-lightbox-anchor-text-or-image
May 5, 2012 at 1:06 am #44747PeterMemberHi Brian,
Put this code in your wp_lightbox_ultimate_custom.css file and it should centre the image:
.lightbox_ultimate_image_anchor a img{
display: block;
margin-left: auto;
margin-right: auto
}
May 6, 2012 at 8:29 pm #44748bvoseMemberHey, Peter,
Thank you for the response and advice. I have added these 3 codes to the CSS folder of the wp_lightbox_ultimate using a text editor:
.lightbox_ultimate_image_anchor a img{
display: block;
margin-left: auto;
margin-right: auto
}
.lightbox_ultimate_image_anchor {
text-align: center;
}.lightbox_ultimate_image_anchor {
width: 150px;
margin-left: auto;
margin-right: auto;
}
After saving the codes, I updated the current page and even tried it on a new page, and the image was still only left aligned. Do I need to use a different plug-in shortcode then what is shown on the tutorial? Could I update my theme? What other possibilities can I try? Thanks!!
Brian
May 7, 2012 at 12:29 am #44749PeterMemberHi Brian,
I’ve just had a look at your site and it appears that you have not added the code I recommended in the “wp_lightbox_ultimate_custom.css” file.
Please ftp the “wp_lightbox_ultimate_custom.css” file to your computer and then edit it and add the code (ie, only the block of code in my first response) and then save the file and ftp it back onto your host.
July 8, 2013 at 7:31 pm #44750LezlieMemberThis isn’t working for me … I want to move the video over to start display at 500 px (out of 1200) so I set it for: “margin-left: 42%;”
I have it on the autoplay option. I notice that the file: wp-lightbox-ultimate/wp_lightbox_ultimate_custom.css says “inactive”. Any ideas???
July 8, 2013 at 7:33 pm #44751LezlieMemberSorry … the website is [www.MatthewSherley.com/testing/] – I created it as an image map, so I’m using the autoplay. I wish I could figure out a way to embed it in the imagemap – but I haven’t found one.
July 9, 2013 at 12:55 am #44752wpCommerceModeratorHi, currently we don’t have any direct popup option from image map (you can do it from an image).
The script automatically determines the window size to place the popup right in the middle of the screen. But you should be able to customize it by adding this piece of code to the
wp_lightbox_ultimate_custom.css
file:#fancybox-wrap{
left: 500px !important;
}July 9, 2013 at 4:37 am #44753LezlieMemberI wish I could give you a hug right now! That worked perfectly … I have been working on this for four days. You can see the final result at [www.MatthewSherley.com]. This is definitely the answer for anyone using an image map.
July 10, 2013 at 12:24 am #44754wpCommerceModeratorI’m glad that It’s working for you now.
-
AuthorPosts
- You must be logged in to reply to this topic.