Highlighted

How I can avoid underlining in a list with links?

Explorer ,
May 07, 2018

Copy link to clipboard

Copied

I have an index in the ePub-file (InDesign> Export> ePub). In the xhtml-file this gives a list (ul - li). Everything is linked, every voice. How I can avoid the underlining that automatically gives me when I insert a link.

In the CSS-file I have” a.link - active - visited - hover” with "text-decoration: none;". The "text-decoration: none;" I have also added by "ul - il", but the text remains underlined.It works only when I don't have links, the text is not underlined..

How can I avoid this?

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

Try one of these instead (tack it on to the end of your stylesheet)...

a:link, a:visited, a:hover, a:active {

     text-decoration:none;

}

or the more general...

a {

     text-decoration:none;

}

...either should automatically remove the underline from all links.

Views

516

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How I can avoid underlining in a list with links?

Explorer ,
May 07, 2018

Copy link to clipboard

Copied

I have an index in the ePub-file (InDesign> Export> ePub). In the xhtml-file this gives a list (ul - li). Everything is linked, every voice. How I can avoid the underlining that automatically gives me when I insert a link.

In the CSS-file I have” a.link - active - visited - hover” with "text-decoration: none;". The "text-decoration: none;" I have also added by "ul - il", but the text remains underlined.It works only when I don't have links, the text is not underlined..

How can I avoid this?

Adobe Community Professional
Correct answer by Jon Fritz II | Adobe Community Professional

Try one of these instead (tack it on to the end of your stylesheet)...

a:link, a:visited, a:hover, a:active {

     text-decoration:none;

}

or the more general...

a {

     text-decoration:none;

}

...either should automatically remove the underline from all links.

Views

517

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 07, 2018 0
Adobe Community Professional ,
May 07, 2018

Copy link to clipboard

Copied

From what I can tell, your CSS file is giving an instruction that removes underlines from links only with a class of link; you have added the text-decoration:none; to your unordered list bullet items, but that does not override any links in the bullet items.

Try adding a class to your list :     ul.special li a { text-decoration:none; }

or removing the class from the anchor:        ul li a { text-decoration:none; }

Hope this helps... 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 07, 2018 1
Explorer ,
May 07, 2018

Copy link to clipboard

Copied

I added before I need help this, but it don't works: "<li class="li-einzug"><a href="../Text/10-Capitolo%202.xhtml#grod">L’incontro con Groddeck</a><br/></li>".

In this file I don't have anchors. And ul li { text-decoration:none; } I I added itfirst, but it don't works. I don't not why.

This is the CSS:

.il-einzug {

    font-family:"Palatino Linotype", serif;

    font-size:1em;

    line-height:1.1;

    text-indent: 30px;

    text-decoration:none;

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 07, 2018 0
pfudi LATEST
Explorer ,
May 09, 2018

Copy link to clipboard

Copied

I did a new class "underline" in CSS, and I but it into the <a href="File.html" class="underline" />File</ì/a>. I did it years ago and forgot them, but works wery well and avoids underlining text in a link.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 09, 2018 0
Adobe Community Professional ,
May 07, 2018

Copy link to clipboard

Copied

Try one of these instead (tack it on to the end of your stylesheet)...

a:link, a:visited, a:hover, a:active {

     text-decoration:none;

}

or the more general...

a {

     text-decoration:none;

}

...either should automatically remove the underline from all links.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 07, 2018 1
Adobe Community Professional ,
May 07, 2018

Copy link to clipboard

Copied

For reference, see CSS Pseudo-classes CSS Styling Links .

Nancy O'Shea, ACP
Alt-Web Design & Publishing

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 07, 2018 1