navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Print Style Sheet problem

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> Print Style Sheet problem
Page: [1]
 
cswolf

 

Posts: 43
Joined: 11/9/2005
Status: offline

 
Print Style Sheet problem - 1/17/2007 11:24:55   
Hi all,

First off - yes, I have seen the tutorials and FAQ's about the print style sheets at the top of this forum.

I have created a print style sheet for my company's intranet site and for the most part I am happy with it, but it doesn't work 100% correct. I took over managing this site from someone else. The layout was not made with CSS, but rather with tables. I gave a few of the tables some id names and then used CSS to style them. It looks great on the screen, but not for print. The problem I am having is that I cannot for the life of me get the border on this one table to NOT show up for print purposes. Font style and colors are being ignored as well within this table. For the screen, here is my styling of this table:

#myTable {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
border: 1px solid #D7D2C2;
}


Where this table is used in the web page, the html looks like this:

<table width="95%" border="0" align="center" cellpadding="5" cellspacing="5" id="myTable">

Yes, I understand there are some properties there that I could also style with CSS and it is on my "to-do" list but I haven't gotten there yet.

When viewing this on the screen, the table appears in the center of the page, with a 1px grey border around it and then all content goes in the middle with the appropriate font (Verdana) and size (12px), just like it is supposed to.

So then I made a print style sheet in which I defined a class called "noPrint" which I applied to such things as the header and footer of the page, and also told it to display no images. Basically what it does is not display anything except this table and it's contents. I restyled this table in the print style sheet with the following:

#myTable {
font-family: Arial, Helvetica, sans-serif;
font-size: 12pt;
border: none;
width: 7in;
color: #000000;
}


Now here's where it gets confusing - as you can see some things have changed. However the fonts still show up in Verdana and the border still shows around the table. BUT...it is now set to a width of 7 inches so nothing gets cut off when printing. It's almost like it's reading SOME of the print style sheet but not all of it, and I can't figure out for the life of me why. Does anyone have any ideas? Thanks!
Tailslide

 

Posts: 5912
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Print Style Sheet problem - 1/17/2007 11:31:51   
Forgive me for asking, but are you specifying media=print in the stylesheet link rather than screen or whatever? (I ask 'cos I've done that one myself! :)).

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to cswolf)
cswolf

 

Posts: 43
Joined: 11/9/2005
Status: offline

 
RE: Print Style Sheet problem - 1/17/2007 11:34:09   
Yes I am. Sorry, I should have mentioned that.

(in reply to Tailslide)
Tailslide

 

Posts: 5912
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Print Style Sheet problem - 1/17/2007 11:48:56   
No problem.

Tricky... hmmmm.

Can you possibly paste in the HTML page markup and the CSS files (both of them) and then we can test locally to try to figure it out. I'm assuming that we can't get access to it on the open web anywhere?

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to cswolf)
mtfm

 

Posts: 414
Joined: 1/13/2006
From: Mesa, AZ
Status: offline

 
RE: Print Style Sheet problem - 1/17/2007 14:03:10   
usually when I find it is reading some but not all of a stylesheet it is because of a typo-- a misplaced or absent semicolon, or a ( instead of a {, something along those lines.


(in reply to Tailslide)
cswolf

 

Posts: 43
Joined: 11/9/2005
Status: offline

 
RE: Print Style Sheet problem - 1/17/2007 14:13:15   
Thanks for your help everyone, but I actually figured out what was wrong!

The site was made using Dreamweaver, and some portions of the header/footer were created using the Library feature. I discovered that one of the libraries in use had a link in it to the screen style sheet, so that was overiding the print one because it was further down the page. I removed the link to that screen style sheet in the library file (it wasn't needed) and now it works the way I want it to!:)

(in reply to cswolf)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> Print Style Sheet problem
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts