Grow your CSS skills. Land your dream job.

[Solved] html conflicts with CSS

  • # July 2, 2014 at 5:04 am

    This is the code that gives the problem.

    <div class="titlebigger"><a id="anthonym">Anthony Missen</a></div>

    Anthony Missen is seen as being an active link, which it is not. It is only an id (=anthonym) so the link on another page knows to go here.

    Because it is seen as an active link it gets underlined. This is inherited I guess. I don’t want it underlined. When I give it titlebigger{text-decoration: none;} it neglects font size AND is still underlined ..

    What can I do?

    # July 2, 2014 at 5:37 am

    u may try this

    a#anthonym {
    text-decoration: none;
    }

    # July 2, 2014 at 5:48 am

    wow thanks blackhiu it works!! it’s only a couple of minutes ago that I registered and already got the sollution. Thanks ! Great

    # July 2, 2014 at 6:12 am

    That just removes the underline from the text — it’s still viewed as a link so when you hover your mouse over it, it will change the cursor.

    I think you shouldn’t make it a link in the first place, cause it’s not an actual link. It’s just a placeholder with a specific ID, so why not just do this?

    <div><span id="anthonym">Anthony Missen</span></div>
    
    # July 2, 2014 at 1:18 pm

    if you want to link another page to this use the following:

    <a name=comehere></a><div>Anthony Missen</div>

    then a link from another place will have to be:
    <a href="#comehere">To Anthony Missen</a>

    or

    .titlebigger a {
    text-decoration: none;
    }
    
Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".