9: Re: CSS Templates (response to 7)
Posted by Voice Admin on

I think it is probably being read correctly by the browser, but the rules following your print section are overriding the styles.

Unless you specifically limit your other rules to screen only, then later rules will always override earler rules.

So either there are (at least) two approaches:

  1. put your screen styles into a @media screen { } block following your @media print { } block
  2. define your global styles at the top of the file and put your @media print { } section at the end of the file to tweak those rules by overriding the bits you want to change.

For maximum compatibility the first option is probably best, with your print styles defined first. That way if you use an old browser which doesn't understand print/screen rules then the later rules will override the earlier ones and they won't end up with looking at the print styles all the time.

Thanks

Voice Admin

11: Re: CSS Templates (response to 9)
Posted by Deleted User on

Thanks - that seesm to have done the trick

Phil

12: Re: CSS Templates (response to 11)
Posted by Deleted User on

This one seems to have resurrected itself!

I have a single style sheet with @media all [ lots of styles here } and @media print { a coupe of styles here} at the bottom. So general styles should be ober-ridden by the print styles at Print Preview.

The print style is not being read at all e.g. main style is Verdana but print shows as Times (the default). If I put the print styles in a specific page it works as expected.

Any idea what I am doing wrong?
Phil

Thanks 

13: Re: CSS Templates (response to 12)
Posted by Deleted User on

This may be a browser problem. I am using IE10

If I use Chrome the print styles are read correctly - but the screen font type is wrong!

I will investigate firther

Phil