WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to hide links underline (24 posts)

  1. fabthi
    Member
    Posted 2 years ago #

    Hi everybody
    I have this page where phrases linked to external sites (Visitate il portfolio...) appear with underline and underline itself is changing color when you hover on the phrase.
    How can I avoid the underline to appear?
    thanks
    Fabio

  2. vtxyzzy
    Member
    Posted 2 years ago #

    Try adding this to the end of style.css:

    body.home a:link { text-decoration: none; }
  3. fabthi
    Member
    Posted 2 years ago #

    vtxyzzy thanks
    I tried, but it doesn't work

  4. vtxyzzy
    Member
    Posted 2 years ago #

    I do not see the line at the END of style.css. Please put it there and leave it so I can see.

  5. fabthi
    Member
    Posted 2 years ago #

    I removed the line since it didn't wotk, that's why you don't see it.
    I will put it back now

  6. vtxyzzy
    Member
    Posted 2 years ago #

    I see the line now, and it appears to be working. Did you clear your browser cache?

  7. fabthi
    Member
    Posted 2 years ago #

    Yes I did, and this morning I checked it again with a different browser+computer but it's still there (screenshot)

  8. fabthi
    Member
    Posted 2 years ago #

    To make sure we are talking about the same thing, I attach a screenshot of the Dashboard>Pages of what I call Page Title

  9. vtxyzzy
    Member
    Posted 2 years ago #

    I do not see an underline on lines like this:

    > Visitate il portfolio Fabio Thian Photography <

    I checked with FF v12.0. IE v9, Chrome v18.

  10. fabthi
    Member
    Posted 2 years ago #

    Ooops! Sorry vtxyzzy
    as you probably suspected I replied with the wrong samples, I have another thread going on and I mixed up the replies.
    And, of course, you are right, underlines have disappeared from my links!
    Thanks a lot for your help and, once more, please forgive my carelessness.
    BTW, my other thread is about the same page but a different issue, I need to hide the Page Title (see the screenshots I mistakenly posted here). Do you know how to achieve this?
    Fabio

  11. vtxyzzy
    Member
    Posted 2 years ago #

    To hide that page title, try adding this to the end of style.css:

    #post-4 .entry-title { display: none; }
  12. fabthi
    Member
    Posted 2 years ago #

    Grand! thanks again!!!!
    Fabio

  13. fabthi
    Member
    Posted 2 years ago #

    The code for removing the links underline sometime seems not working; I added the same code to the style.css of this page but link is still changing color when hover on it

  14. esmi
    Forum Moderator
    Posted 2 years ago #

    Try using Firefox with the Firebug add-on for this kind of CSS work.
    http://getfirebug.com/

  15. fabthi
    Member
    Posted 2 years ago #

    Hi Esmi
    thanks, I installed Firebug but...what should I have to look for exactly??

  16. vtxyzzy
    Member
    Posted 2 years ago #

    You are using two different stylesheets for those pages. There are many changes from one to the other.

  17. fabthi
    Member
    Posted 2 years ago #

    You are using two different stylesheets for those pages

    I am using the same theme (Brunelleschi) with the same plugins; the only difference between the two is the Content Width option that is 800px and 960px

  18. vtxyzzy
    Member
    Posted 2 years ago #

    The hover color can be controlled by this css:

    a:active, a:hover, a:visited { color: #0066CC; }

    You must change the color to whatever you want the links to be.

    But, the underline is caused by a surrounding span tag with a style in it. You will need to remove that span tag.

  19. fabthi
    Member
    Posted 2 years ago #

    Sorry vtxyzzy, it's my fault in describing my issue.
    My main and real problem is to avoid links changing color when hover.
    If you take a look at this page you can see links are underlined (my choice) but they maintain their original font color when hover. I didn't make any modification to css for this and also notice I use the same theme of the page where links change color instead.
    That's something I don't understand; the reason I am using the same theme and plugins (and theme settings as well) is to avoid precisely this kind of troubles, I mean I expect that things should work the same way.
    But they don't, and this is an odd thing about WP...

  20. vtxyzzy
    Member
    Posted 2 years ago #

    The cause is not WP, but the coding of the pages. In this page

    http://fotografodimatrimoni.fabiothian.com/

    the link text is enclosed in a span tag that sets the color:

    <a target="_blank" href="http://www.fabiothian.com/weddings">
    <span style="color: #808080;">
    <strong>> Visitate il mio portfolio <</strong>
    </span>
    </a>

    In this page:

    http://fotografodimatrimonio.fabiothian.com/http:/

    the span encloses the entire link, not just the text, so the behaviour is different:

    <span style="color: #606060;">
    <strong>
    <a target="_blank" href="http://www.fabiothian.com/weddings">> Visitate la mia galleria <</a>
    </strong>
    </span>

    You have coded the entries differently on the two pages.

  21. fabthi
    Member
    Posted 2 years ago #

    I don't know why this is happening, I always use the visual editor and I only go to the html editor when something (like this case) is wrong.
    That's why I say that I am doing "same things with different results"...

  22. vtxyzzy
    Member
    Posted 2 years ago #

    The WP visual editor is notorious for not doing quite what you want. You might try the CKEditor plugin. Many users find it more reliable than TinyMCE.

  23. fabthi
    Member
    Posted 2 years ago #

    The WP visual editor is notorious for not doing quite what you want.

    Eh eh...I often thought the same thing ;-)
    I'll give a try to the plugin you suggest, thanks!

  24. fabthi
    Member
    Posted 2 years ago #

    Wow, the CKE visual editor panel is a promise for wonders!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.