Print CSS Not Loading

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • william.oram@gmail.com

    Print CSS Not Loading

    alt.html pointed me here, so...

    I have two CSS files for print and screen. In screen.css:

    ..screen
    {
    font-weight:bold;
    font-size:12px;

    }

    ..print
    {
    visibility:hidd en;

    }

    In the HTML:

    <html>
    <head>
    <link rel="stylesheet " type="text/css" media="print"
    href="print.css " /

    <link rel="stylesheet " type="text/css" media="screen"
    href="screen.cs s" />
    </head>
    <body>
    <font class="screen"> Text A</font><br><font class="print">T ext B</
    font>

    [etc.]

    In print.css, the parameters are swapped. In other words, Text B will
    show on the printed page, but not on screen, and vice-versa for Text
    A.

    But as it stands now, it's not quite working. On "screen," it looks
    OK; hidden text is hidden, shown text is shown. When printed in
    Firefox 2, though, the output looks no different from on "screen." I'm
    stumped why this is, and so is everyone else I've shown this to. Any
    ideas?

  • Andreas Prilop

    #2
    Re: Print CSS Not Loading

    On Thu, 20 Sep 2007, william.oram@gm ail.com wrote:
    alt.html pointed me here, so...
    I have two CSS files for print and screen.
    .... and I point you to
    news:comp.infos ystems.www.authoring.stylesheets

    Comment

    • Jim Moe

      #3
      Re: Print CSS Not Loading

      william.oram@gm ail.com wrote:
      alt.html pointed me here, so...
      >
      I have two CSS files for print and screen. In screen.css:
      >
      You've left out too much context to give an answer.
      Please provide an URL to a test case that demonstrates the problem.

      --
      jmm (hyphen) list (at) sohnen-moe (dot) com
      (Remove .AXSPAMGN for email)

      Comment

      • Thomas Dowling

        #4
        Re: Print CSS Not Loading

        william.oram@gm ail.com wrote in
        news:1190306485 .322880.281090@ n39g2000hsh.goo glegroups.com:
        >
        <html>
        <head>
        <link rel="stylesheet " type="text/css" media="print"
        href="print.css " /

        One reason why it's better to give a URL than to post code. No one
        here can say if that's an error in copy/paste or in your original page,
        but this link element isn't closed. And unless you're doing XHTML,
        just use ">" and not "/>". A validator would help you find a problem
        like that immediately.


        Comment

        • Jukka K. Korpela

          #5
          Re: Print CSS Not Loading

          Scripsit Thomas Dowling:
          ><html>
          ><head>
          ><link rel="stylesheet " type="text/css" media="print"
          >href="print.cs s" /
          >
          One reason why it's better to give a URL than to post code.
          Indeed.
          No one
          here can say if that's an error in copy/paste or in your original
          page, but this link element isn't closed.
          Technically, it is.
          A validator would help you find a
          problem like that immediately.
          No, it would not. Try it. The link element's markup is valid, HTML 4.01.

          It's time for a rerun of the Saga of the Slashed Validators:

          (even though it mainly discusses variants like <a href=../foo.html>, which
          can be even more deceptive).

          --
          Jukka K. Korpela ("Yucca")


          Comment

          Working...