Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format is lost when "Print Preview"

Status
Not open for further replies.

CliffClimber

Technical User
Sep 18, 2003
16
US
Hi!
The following is what I have at the top of my page. It passes
the W3C HTML Validator with no errors, but when I do a Print
Preview it sometimes doesnt format correctly. I think my
problems may be in the last 3 lines but I haven't found any
clear explinations yet. Previously I used a linked CSS page
but I now have it all inline. Does someone see what is not
correct?
Thanks, Cliff

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"<html xmlns=" lang="en" xml:lang="en">
<head>
<title>Pima Property Search</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
 
Are you expecting us to see what your problem with printed format is by showing us your doctyle, title, meta and opening style tags, which never even appear on the printout? Please provide us with a link to the page.

If I would have to guess, I'd say you are loading special printing stylesheets, or your design is too big for paper.
 
Oh hang on - I see what the problem is - you've not closed your style tag, have no body, and no body content! [bigsmile]
 
Cliffclimber, I think you need to employ a sarcasm filter ;-)


They are right though, we can't really diagnose a problem without seeing it.
However I was interested in your statement;
Previously I used a linked CSS page
but I now have it all inline.

Why would you do that? Surely that makes maintenance more difficult and increases bandwidth usage?

My guess is that you are, or were, using print stylesheets somewhere and now you have redone your CSS you don't have a print stylesheet.

Foamcow Heavy Industries - Web design and ranting
Buy Languedoc wines in the UK
 
Cliffhanger: If you can post a link to the page or the source for it some of us will be more than willing to help out more.

At a guess I think the problem is going to be as Vragabond pointed out earlier: the page resizing dynamically to fit a printed sheet.

The easiest solution would be to create a second set of styles specifically for printing. There are about 4 ways you can specify which stylesheet to use for which media: W3Schools - @media
In addition to specifying it on the attribute level in your CSS you can also specify it as an attribute in your style or link rel tags. What this will allow you to do is alter the layout for printing so that it will fit a printed page. In addition you could also make some other alterations (like removing big images or making the header for the page smaller, etc).

There are also several well written articles about print styling at AListApart that may not cover your exact problem but would show you the media tags in use and some important print issues.

barcode_1.gif
 
Whoops, sorry for the mis-type on your name CliffClimber...a little early for me, usually I have more coffee in my system by now.

barcode_1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top