This question has certainly been asked before, but I couldn't find an answer to my problem. I understand mediums and love them. I thought this would be an easy one, but after investing several hours on trial an error, I just can't figure it out. If I set "text-decoration" for the Default medium to "none" of <a> to get rid of the underline in <a href> links, it disappears from online content but not from a PDF (the target is set to "print" medium). If I set an additional text-decoration "none" for Print medium, it still doesn't remove the underline. A color change (maroon) won't take in print either. If I add a font-size change, that takes, but the underline and original color (blue) remain. All these style changes show clearly in the friendly CSS window; in the text CSS, the "font-size" label (which works) is blue, but "text-decoration" and "color" labels (which don't work) are red; the values for all three are blue. There is no local formatting, just "Get more info at <a href="[%=Variables.DigiTrak-http%]"><MadCap:variable name="Variables.DigiTrak-www" /></a>. This behavior persists whether I use variables or plain text in the link path or text. I can make the underline disappear with local formatting "text-decoration: none;", but obviously I risk a public scourging by even suggesting that . I could create a separate style just for the xfef'd text, but that's so extra-workaround-stupid I haven't even tried it yet . I also cannot use cross-references here because I am pointing to a website, not a location in the project. I checked in another project and got the same persistent underline. How/where do I get rid of it in the CSS? Many thanks!
Remove <a> underline in Print medium?
Remove <a> underline in Print medium?
You do not have the required permissions to view the files attached to this post.
-
- 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: Remove <a> underline in Print medium?
Is there something further down in the stylesheet that's overriding it? Looking at your screenshot you've got at least 800 lines so something could be missed.
I'd try a search for text-decoration (if you haven't already) to see if there are any potential cascade effects.
I'd try a search for text-decoration (if you haven't already) to see if there are any potential cascade effects.
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
Re: Remove <a> underline in Print medium?
If you change to Print Layout and Print medium in the XML editor and use the style inspector, this would probably tell you where it's inheriting its style from.
Re: Remove <a> underline in Print medium?
Check if you have any additional link classes in your stylesheet, such as a.active, that are inferring.
Re: Remove <a> underline in Print medium?
Thanks all for your suggestions. None were “it”, but they did get me to the answer!
SteveS: The only occurrence of “text-decoration” (TD) is in the Print Medium section, which has only the definition for <a>. I moved it to the main Default section, deleted the Print section, set the Target to use Default instead of Print, and still get an underline.
AlexFox: The Style Inspector clearly says “text-decoration: none” in the [first] Local Style Attributes section; no TD is inherited from <p> or <body>. Though if I take the TD-none completely out, the inspector still says “TD-none” but there is still an underline both in the XML window and the final PDF .
MeganTR: None of the pseudo classes have any additional styles set. I even tried setting pseudo Active to TD-none (again) and still get an underline.
I opened another project with a much smaller style sheet and the <a> underline will not go away there either. I created a brand new project and underline is defaulted to Inherit. I set the <a> style for TD to none, save, and…nothing happens in the XML.
But I saw another style in the text SS called “a:link” that had a color and weight assigned, so I added TD-none...and it worked. Went back to my actual project and was happy to see it work there too. Perhaps <a> alone just doesn’t reflect that attribute, even though you can set it. True or not, check this one off as resolved. Thanks again!
SteveS: The only occurrence of “text-decoration” (TD) is in the Print Medium section, which has only the definition for <a>. I moved it to the main Default section, deleted the Print section, set the Target to use Default instead of Print, and still get an underline.
AlexFox: The Style Inspector clearly says “text-decoration: none” in the [first] Local Style Attributes section; no TD is inherited from <p> or <body>. Though if I take the TD-none completely out, the inspector still says “TD-none” but there is still an underline both in the XML window and the final PDF .
MeganTR: None of the pseudo classes have any additional styles set. I even tried setting pseudo Active to TD-none (again) and still get an underline.
I opened another project with a much smaller style sheet and the <a> underline will not go away there either. I created a brand new project and underline is defaulted to Inherit. I set the <a> style for TD to none, save, and…nothing happens in the XML.
But I saw another style in the text SS called “a:link” that had a color and weight assigned, so I added TD-none...and it worked. Went back to my actual project and was happy to see it work there too. Perhaps <a> alone just doesn’t reflect that attribute, even though you can set it. True or not, check this one off as resolved. Thanks again!