25 users online (2 members and 23 guests)  


  Results 1 to 2 of 2

Related

  1. Replies: 1
  2. links links and selectbox    Forum: HTML Forum
    Replies: 1
  1. #1
    mfisher_jr's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2005
    Posts
    1

    Turning a:after off for some links

    Hi,

    I've recently begun using the a:after selector for all of the links on our site's printer friendly pages:

    a:after {
    content: " <" attr(href) "> ";
    background:#fff;
    color:#000;
    font-weight:normal;
    }

    And, it works as advertized in Mozilla 1.7.5. However, for some links, I don't want the href to show up and tried the following code (which is defined after the above style):

    a.hide-on-print:after {
    content: normal;
    }
    <a name="name" class="hide-on-print"></a>
    <span>Some Text</span>


    There's a <> displayed before 'Some Text'. Without an href in the anchor, I don't want the brackets displayed before the text.

    Can anyone help me on this?
    Thanks,
    Marty

  2. #2
    juanmanuel's Avatar
    New User

    Status
    Offline
    Join Date
    May 2005
    Posts
    8

    Re: Turning a:after off for some links

    a:after, it means for all the anchors in your page put the text that you set on content property; so the best you can do is set a null content for the hide-on-print class:
    a.hide-on-print:after {
    content: "";
    }



Tags for this Thread