Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How I can avoid underlining in a list with links?

Explorer ,
May 07, 2018 May 07, 2018

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?

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

correct answers 1 Correct answer

Community Expert , May 07, 2018 May 07, 2018

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.

Translate
Community Expert ,
May 07, 2018 May 07, 2018

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... 

Hope this helps!
Make sure to press "✔ Correct Answer" on this post if this answers your question. Happy Creating!
Anissa • @anissat
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 07, 2018 May 07, 2018

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;

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 09, 2018 May 09, 2018
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 07, 2018 May 07, 2018

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 07, 2018 May 07, 2018

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

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines