WEB Can somebody explain to me why this won't work? v. CSS

Discussion in 'OT Technology' started by Shuffles, Mar 30, 2010.

  1. Shuffles

    Shuffles Grumpy old man at heart.

    Joined:
    Apr 19, 2004
    Messages:
    11,575
    Likes Received:
    4
    Location:
    NOVA
    So in my header, I've got:

    @media print
    {
    .noPrint{display:none}
    }

    And in the body:

    <div class="noPrint">Some text.</div>

    However, the text still appears when I print the page. Assigning this class to an input button works just fine. What gives?
     
  2. Shuffles

    Shuffles Grumpy old man at heart.

    Joined:
    Apr 19, 2004
    Messages:
    11,575
    Likes Received:
    4
    Location:
    NOVA
    I'll check it out again. Also, I think when you're just setting one attribute, you don't need the semicolon. I originally had it in there, but changed it because I thought someone would come in here saying "you don't need that semicolon, lols." And I really wanted to avoid that.
     
  3. Shuffles

    Shuffles Grumpy old man at heart.

    Joined:
    Apr 19, 2004
    Messages:
    11,575
    Likes Received:
    4
    Location:
    NOVA
    Ah, dammit. The class was input.noPrint. No wonder it wasn't working.
     
  4. Shuffles

    Shuffles Grumpy old man at heart.

    Joined:
    Apr 19, 2004
    Messages:
    11,575
    Likes Received:
    4
    Location:
    NOVA
    Oh wow, how did I miss that? Sorry man. Nudes are on the way.
     
  5. Shuffles

    Shuffles Grumpy old man at heart.

    Joined:
    Apr 19, 2004
    Messages:
    11,575
    Likes Received:
    4
    Location:
    NOVA

Share This Page