SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Printer specific stylesheet not working!

    I read an artilce about how to create a printer specific stylesheet, and then I created one. I intended for it to print only the content div, not the header and navbar divs. It printed the html, but it printed it the way the xhtml is layed out. I.E. how it would be displayed on screen without the stylesheet, with the navbar at the bottom.

    http://www.meyerweb.com/eric/article...ev/200001.html

    http://student.acu.edu/~jdc00a/index.html

    http://student.acu.edu/~jdc00a/print.css

    Can anyone tell me what I'm missing?

  2. #2
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the reason is that you've assigned IDs to the header and navbar, but your print stylesheet sets display:none to divs with CLASS header and navbar (because of the dot notation). change
    Code:
    DIV.header {display: none;}
    
    DIV.navbar {display: none;}
    to
    Code:
    #header {display: none;}
    
    #navbar {display: none;}
    and all should be well
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  3. #3
    SitePoint Evangelist
    Join Date
    Jan 2002
    Posts
    457
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. I'm really getting the hang of this CSS stuff! I actually figured out half the problem before I read your post. Thanks for the other part.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •