Thick underline appearing from "nowhere"

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Thick underline appearing from "nowhere"

Post by Zerozeddy »

I have a <span> style that is rendering with a thick underline I don't want:
not really underlined.png
The CSS for this style is

Code: Select all

span.Button
{
	font-weight: bold;
	color: #ffffff;
	background-color: #4f3660;
	border: solid 1px #4f3660;
}
I don't where it's come from. I've put in "text-decoration: none" to no avail, but it's too thick to be an underline anyway.

Just spotted it affects PDF output only, but there's no @media print anywhere that could be contributing, plus it's fine in Word output. Also if I change the font colour the underline remains white.

What else could be causing it?

Thanks!
You do not have the required permissions to view the files attached to this post.
SteveS
Senior Propellus Maximus
Posts: 2089
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Thick underline appearing from "nowhere"

Post by SteveS »

Is the word "Documents" a link?
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
Psider
Propellus Maximus
Posts: 815
Joined: Wed Jul 06, 2011 1:32 am

Re: Thick underline appearing from "nowhere"

Post by Psider »

It looks to me like the white line is caused by an element with a border that's slightly taller than the element that's setting the background color. Perhaps you can post the html for underlined text so we can see what's going on.
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Re: Thick underline appearing from "nowhere"

Post by Zerozeddy »

Not a link, no.

Documents is a snippet, so it's

<p><On the toolbar click <MadCap:snippetText src="../UI_items/Buttons/Documents.flsnp" />.</p>

The snippet itself is

<body><span class="Button"> Documents </span></body>
Psider
Propellus Maximus
Posts: 815
Joined: Wed Jul 06, 2011 1:32 am

Re: Thick underline appearing from "nowhere"

Post by Psider »

Well, there's nothing obvious in that code, although I assume it looks fine in Flare, but the output is borked?

I don't have Flare at the moment, but I'll run through a little thought experiment.

Assuming Flare's snippet is supposed to resolve to the following in the output:
<p>On the toolbar click <span class="Button"> Documents </span>.</p>

I add 'b' tags around the span tags from your variable (just because it's short).

<p>On the toolbar click <b><span class="Button"> Documents </span></b>.</p>

and the css for 'b' is:

b {
border: solid 2px #4f3660;
padding-bottom: 5px;
}

Then I get the following display:
border-issue.PNG
So assuming it's only the output that is a problem, check the html code in the output and see if there is an extra element surrounding your span tags, and that is probably where the odd display is coming from.

If it's also a problem in the Flare editor, I'm not sure what else to suggest.
You do not have the required permissions to view the files attached to this post.
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Re: Thick underline appearing from "nowhere"

Post by Zerozeddy »

Thanks for looking, @psider.

Sadly it is in the editor too, whether I have screen or print as Medium (even though the screen preview is correct).

What I've just discovered is that the "underline" isn't white, but transparent.
not really underlined1.png
You do not have the required permissions to view the files attached to this post.
Psider
Propellus Maximus
Posts: 815
Joined: Wed Jul 06, 2011 1:32 am

Re: Thick underline appearing from "nowhere"

Post by Psider »

So just to confirm:
1. Editor has the odd display
2. Preview displays correctly
3. Web output has the odd display
4. pdf output displays correctly

Is that right?
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Re: Thick underline appearing from "nowhere"

Post by Zerozeddy »

Not quite.

1. Editor: Screen medium is wrong
2. Editor: Print medium is wrong

3. Preview: HTML5 is right
4. Preview: PDF is wrong

5. Output: Word is right
6. Output: HTML5 is right
7. Output: PDF is wrong

Hmm. Looks different in Simplified vs Advanced views in stylesheet editor too
not really underlined2.png
You do not have the required permissions to view the files attached to this post.
Last edited by Zerozeddy on Wed Mar 14, 2018 5:07 am, edited 1 time in total.
Psider
Propellus Maximus
Posts: 815
Joined: Wed Jul 06, 2011 1:32 am

Re: Thick underline appearing from "nowhere"

Post by Psider »

Weird.

Given the editor is wrong, perhaps look in the css for any MadCap rules. That's about the only thing I can think of that would affect the editor but not HTML.

Otherwise, hopefully what we've covered will help someone else with Flare investigate.
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Re: Thick underline appearing from "nowhere"

Post by Zerozeddy »

Yes. Thank for your help :)
Zerozeddy
Propeller Head
Posts: 45
Joined: Mon Dec 01, 2014 9:42 am

Re: Thick underline appearing from "nowhere"

Post by Zerozeddy »

FYI adding

line-height: normal;

to the span style seems to have sorted it.
Post Reply