Changing Print Styles with CSS (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


Xylina -> Changing Print Styles with CSS (7/10/2006 15:19:08)

I have most of the CSS that I need to make this page print correctly, but there are a couple of more things I would like to change. On the Website I want the text to be the colour it is so that it fits in with the overall colour scheme, but when someone prints something, I would like it to print in black, instead of the blue. Also, I would like the [Back] [Home] [Archive] [Next] links at the bottom to not print.

Here is the CSS that I have so far:

.maintable { width: 95%; align: center; border: 0px; }
.table { border: 0px; color:#000000; }

Nothing too fancy, as you can see, but hey, it works.

For an example of what I am talking about go to: http://coxandcompany.biz/TalkingBusiness/BusinessPlanning.htm

Any assistance with this will be greatly appreciated.

Thank you,

Xylina




Tailslide -> RE: Changing Print Styles with CSS (7/11/2006 3:59:20)

Hi

You've got those links at the bottom sitting in an unamed div. If you give the div an id then you can exclude it in the print stylesheet.

So if you call that div "footer" for instance you can just do

#footer {display:none;}


In the print stylesheet, and nothing in that div will show up. This is one reason why it's a good idea to call different bits of your page different things = div id="header", div id="text", div id="footer". You don't want to go overboard about it either but it does help when you want to apply specific rules to sections of your page.




Xylina -> RE: Changing Print Styles with CSS (7/11/2006 17:48:38)

I have finally stumbled onto the solution, or at least one that works anyway, lol

Thanks for all your help,

Xy




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875