Tips and Tricks HQ Support Portal › Forums › WP Lightbox Ultimate › Lightbox Ultimate – Anchor text forces line break
- This topic has 28 replies, 4 voices, and was last updated 11 years ago by wpCommerce.
-
AuthorPosts
-
April 7, 2012 at 5:54 pm #6045bobkSpectator
Just purchased and installed Lightbox Ultimate.
When I use a text anchor (to an html page), it forces a line break. I tried modifying the width of
.lightbox_ultimate_text_anchor
using CSS, but that didn’t work. When I hover over the word format in Safari’s Web Inspector, it displays the dimensions I entered numerically, but the blue box showing the div is still as wide as it was before the change.
Here’s the page: http://bobkarty.pairsite.com/listen_and_buy/leader_solo_artist/
There are 3 audio players. The top one is the problematic one.
The bottom two show how I want it to look, with no line break – i.e., the price, the words ‘choose format’, the drop-down menu, and the ‘add to cart’ button are all on the same line.
Thanks!
Bob
April 7, 2012 at 9:38 pm #43835bobkSpectatorResolved!
Added the following CSS to my child theme:
.lightbox_ultimate_text_anchor {
display: inline;
}
April 8, 2012 at 12:49 am #43836wpCommerceModeratorHi, we don’t have any CSS defined in the plugin to force line break for the anchor text. It depends on how your theme want the text to look like.
Anyway, I’m glad that the issue has been resolved.
April 8, 2012 at 2:51 am #43837bobkSpectatorA web developer friend provided the solution; if I recall correctly, he said the plugin contains the anchor text in a div, which by default is displayed as a block element, and that caused the line break.
April 8, 2012 at 11:36 am #43838wpCommerceModeratorHi, Sorry for the mistake. I get it now. Yes, the anchor text is inside an empty div. This is so you can customize it on your own.
May 1, 2012 at 2:47 am #43839njkalmMemberHi, I’m having the same problem too. I think I understand the problem in principle, but I’m not sure what the solution is. I tried adding the “display: inline” code to my theme’s CSS, but it doesn’t resolve the problem. It appears that there is a <p></p> set of tags preceding the text anchor code that is causing the line break that I can’t figure out how to get rid of.
Any ideas?
May 1, 2012 at 8:37 am #43840wpCommerceModeratorHi, You don’t need to modify the theme’s CSS. Just open the
wp_lightbox_ultimate_custom.css
file (It’s in the root directory of the plugin) and add the following CSS:.lightbox_ultimate_text_anchor {
display: inline;
}The template for the CSS class is already there. All you need to do is specify the attribute for it (
display: inline;
).Let me know how it goes.
May 1, 2012 at 6:24 pm #43841njkalmMemberThanks so much for the reply. It’s the darndest thing; I tried the suggestion but the <p> tags remain and there is still a line break. I’ve uploaded a picture here: http://s16.postimage.org/o7ha20okl/Screen_Shot_2012_05_01_at_2_20_33_PM.png
Any idea what is causing those <p> tags?
May 2, 2012 at 12:47 am #43842wpCommerceModeratorHi, could you post a link to the page where you are using the shortcode?
May 2, 2012 at 2:04 am #43843njkalmMemberSure, the actual page is behind a member wall, but here’s a test page I set up: http://www.bulletproofmusician.com/test-4/
Thanks for looking into it!
May 2, 2012 at 11:40 am #43844wpCommerceModeratorHi, the anchor text doesn’t have any
<p>
or<br>
tag associated with it. If you revert the CSS back (display:inline) you will see that there is not additional gap between the anchor text and the following line:), but either way it’s always nice to get started off on the right foot.
So I think it has something to do with the line before (
It’s a little like opening a box from IKEA. It might seem obvious what to do
) or after (Speaking of which, if you run into something that confuses you, or need a bit of advice or
) the anchor text. They both seem to have a <p> tag. I don’t know if your theme has any CSS defined that <p> tag will keep that much gap with other elements./*Update*/
I think I just found something. If you use firebug you will see that the following CSS attribute is causing this big gap:
.format_text p {
margin-bottom: 1.467em;
}I believe It’s coming from
gzip.php?css=......
. As soon as I turned that off all the elements look normal.May 2, 2012 at 2:35 pm #43845njkalmMemberIndeed, removing that bit of CSS does fix the problem, but unfortunately causes a bigger problem, in that I’d have to go back through every page and post and manually add paragraph breaks for every paragraph.
But in playing around with your suggestion, I think I may have found a solution/workaround.
If I surround that paragraph and the following paragraph with a set of <div> tags, the problem is solved. I’m not sure if I understand why that works, but hey, it works. Yay!
Thanks again for all your help!
May 3, 2012 at 12:50 am #43846wpCommerceModeratorYou’re welcome
November 19, 2012 at 4:40 am #43847bobkSpectatorUPDATE:
When I updated WP eStore and Lightbox ultimate a few months ago, the unwanted line break reported in my initial post came back.
The CSS I added (as described on the previous page of this thread) resulted in the variation menu and ‘add to cart’ button being on the same line as the text ‘$1.00’ and ‘choose format’.
http://bobkarty.pairsite.com/listen_and_buy/leader_solo_artist/
The ‘display inline’ css is still present in the custom CSS of the child theme I’m using (‘Dynamik’, by Catalyst Theme), and I also tried adding it directly to the wp_lightbox_ultimate_custom.css file. That didn’t help.
How can I fix this?
Thanks in advance!
WordPress version: 3.4.2
WP eStore version: 6.9.4
Lightbox Ultimate version: 1.8.4
As best I can recall, I had not made any modifications to my site (i.e, the WordPress theme or the audio player plugin) when this issue returned.
November 20, 2012 at 3:43 am #43848wpCommerceModeratorHi, We haven’t made any changes to Lightbox Ultimate plugin that will affect this. However, you can try another method for removing the line break.
Step 1: Keep the CSS class lightbox_ultimate_text_anchor empty (remove all the css attributes inside it).
Step 2: Create your own CSS class and put it in the
wp_lightbox_ultimate_custom.css
file. For example:.my_test_class{
display: inline;
}Step 3: Pass the CSS class name through the lightbox ultimate shortcode. For example:
[wp_lightbox_anchor_text_display_external_page link="http://bobkarty.pairsite.com/audio-format-basics/" width="740" height="740" title="Audio Format Basics" text="(?)" class="my_test_class"]
Now you don’t have to globally set it for all the anchor text shortcodes. You can customize each shortcode (including the anchor image one) with your own way.
Let me know if it works for you.
-
AuthorPosts
- You must be logged in to reply to this topic.