473,233 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,233 software developers and data experts.

Browsers not breaking pages on print

Trying to print a web page that scrolls to right a bit. I would think
IE would page break by default when it gets to the end of the sheet,
but it doesn't, it just cuts off the print. This only needs to work
in IE but FF does the same thing. I tried messing with some
media="print" functionality on it but couldn't get any page breaks to
happen. I'm guessing there's something in the markup of the page that
the browsers don't like, any idea what I should look for? Thanks.
Nov 21 '07 #1
9 2736
On Wed, 21 Nov 2007, xprotocol wrote:
Trying to print a web page that scrolls to right a bit.
Your own page? Which address (URL)?

--
Top-posting.
What's the most irritating thing on Usenet?
Nov 21 '07 #2
xprotocol wrote:
Trying to print a web page that scrolls to right a bit. I would think
IE would page break by default when it gets to the end of the sheet,
but it doesn't, it just cuts off the print. This only needs to work
in IE but FF does the same thing. I tried messing with some
media="print" functionality on it but couldn't get any page breaks to
happen. I'm guessing there's something in the markup of the page that
the browsers don't like, any idea what I should look for? Thanks.
You mean you expect the browser to do what Excel does with a wide
spreadsheet, treating the presentation as though it's multiple pages
across as well as down? It won't. It's up to you to structure your page
so that its layout adjusts to fit the width of whatever medium is being
used to display it.
Nov 21 '07 #3
On 2007-11-21, Harlan Messinger wrote:
xprotocol wrote:
>Trying to print a web page that scrolls to right a bit. I would think
IE would page break by default when it gets to the end of the sheet,
but it doesn't, it just cuts off the print. This only needs to work
in IE but FF does the same thing. I tried messing with some
media="print" functionality on it but couldn't get any page breaks to
happen. I'm guessing there's something in the markup of the page that
the browsers don't like, any idea what I should look for? Thanks.

You mean you expect the browser to do what Excel does with a wide
spreadsheet, treating the presentation as though it's multiple pages
across as well as down? It won't. It's up to you to structure your page
so that its layout adjusts to fit the width of whatever medium is being
used to display it.
I think you have that backwards. :)

"It's up to you to not to structure your page so that its layout
doesn't adjust to fit the width of whatever medium is being used
to display it."

By default, a page will adjust; if it doesn't, its because you have
done something to prevent it.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Nov 21 '07 #4
"Chris F.A. Johnson" <cf********@gmail.comwrites:
On 2007-11-21, Harlan Messinger wrote:
You mean you expect the browser to do what Excel does with a wide
spreadsheet, treating the presentation as though it's multiple pages
across as well as down? It won't. It's up to you to structure your page
so that its layout adjusts to fit the width of whatever medium is being
used to display it.

By default, a page will adjust; if it doesn't, its because you have
done something to prevent it.
For example, adding content with an unavoidably large intrinsic
width. Data tables can reasonably have several columns each containing
long(ish) words or numbers that constrain their minimum width. Only
being able to print off the left half (quarter, tenth) of a complex
data table *is* a browser bug. In most other display media, in this
situation, you'll get a scroll-bar and be able to read the table. Not
the most user-friendly interface, but you can at least get at the
data. In print, where a scroll-bar is impossible, why *shouldn't* the
browser print (at least as an option!) multiple pages horizontally?

--
Chris
Nov 21 '07 #5
Chris Morris wrote:
"Chris F.A. Johnson" <cf********@gmail.comwrites:
>On 2007-11-21, Harlan Messinger wrote:
>>You mean you expect the browser to do what Excel does with a wide
spreadsheet, treating the presentation as though it's multiple pages
across as well as down? It won't. It's up to you to structure your page
so that its layout adjusts to fit the width of whatever medium is being
used to display it.
By default, a page will adjust; if it doesn't, its because you have
done something to prevent it.

For example, adding content with an unavoidably large intrinsic
width. Data tables can reasonably have several columns each containing
long(ish) words or numbers that constrain their minimum width. Only
being able to print off the left half (quarter, tenth) of a complex
data table *is* a browser bug.
No it isn't. It may be the lack of a *useful feature*, but that's a
topic for a different discussion, and I would dispute it. If you've got
a web page consisting of text that insists on being wide enough to
overflow the right margin of a piece of paper, then should it split the
content along a straight vertical line, slicing right through characters
and images as it goes? If the web page is 500 lines long, equivalent to
maybe 20 sheets of paper when there *isn't* a horizontal overflow, and
only one paragraph, or perhaps a short table or an image, overflows the
right margin, then when you print the page should the printer, in
addition to 20 sheets containing the left side of the content, spit out
19 blank pages as well as the 20th that has the right side of the
overflowing material on it? Or 38 blank pages as well as the 39th and
40th if the overflow is itself more than one page wide?

In most other display media, in this
situation, you'll get a scroll-bar and be able to read the table. Not
the most user-friendly interface, but you can at least get at the
data. In print, where a scroll-bar is impossible, why *shouldn't* the
browser print (at least as an option!) multiple pages horizontally?
Nov 21 '07 #6
xprotocol wrote:
Sorry, its hard to be specific as the HTML source is rather complex
and probably wouln't make things much easier to understand if I posted
it.
For heaven sake no! Don't post code, post a URL to the code!
The easiest explanation I can say is that somewhere in the source
I have two large SPAN's. For one of them I said "page-break-
after:always;" but nothing happened.
SPANs? SPANs are *inline* elements page-break-before & page-break-after
properties that apply to *block* elements so I am not surprised that it
does not work.
I guess what I'm looking for is
maybe an explanation or a site that says what the rules are for using
these printing features. Everything Google came up with was very
basic (i.e. put this in and you magically get a page break, obviously
not the case).

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Nov 22 '07 #7
rf

"xprotocol" <xp*******@gmail.comwrote in message
news:8c**********************************@r31g2000 hsg.googlegroups.com...
Sorry, its hard to be specific as the HTML source is rather complex
and probably wouln't make things much easier to understand if I posted
it. The easiest explanation I can say is that somewhere in the source
I have two large SPAN's. For one of them I said "page-break-
after:always;" but nothing happened.
According to the spec over at http://www.w3.org/TR/CSS21/propidx.html
page-break-after (and all the other page-break things) only apply to block
level elements. Span is an inline element.
I guess what I'm looking for is
maybe an explanation or a site that says what the rules are for using
these printing features. Everything Google came up with was very
basic (i.e. put this in and you magically get a page break, obviously
not the case).
See above.

--
Richard
Nov 22 '07 #8
CJ
I have a similar problem with a page of mine. I have a div that
contains two spans that each contains a table. The table in the left
side div is just a description of activity for a person, while the
table in the right side span has 24 columns, and has small graphics
showing the length of time spent on that activity for a day. The
problem is that the activity description can be pretty long (300 px),
and the graphics for the day add up to make the length of the right
side span pretty long too (~500 px). IE creates a scroll bar at the
bottom of the page, but if I go into print preview, I only see the
description, and maybe 3 hours on a single page. The rest of the
hours just disappear and I can't see them at all.
I have tried adding
<style type="text/css">
SPAN {display:block;}
</style>
<style type="text/css" media="print">
DIV {position:relative;}
SPAN {position:relative;}
</style>
to display SPANs as blocks since one google search implied that could
have been an issue, while another search implied position:absolute
could have also caused an issue.

I don't have this on the open internet because this is for my dad to
use, so I'm leaving it purely intranet
Nov 23 '07 #9
CJ wrote:
I have a div that contains two spans that each contains a table.
You can't put <tableinside a <span>. Maybe your problem will go away
if you have valid markup.

See: http://validator.w3.org/

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 23 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
12
by: confused | last post by:
After expressing my interest in expanding my new knowledge of HTML and CSS into the wild realm of JavaScript, I was advised that it is wiser to avoid it, since not all browsers are use it or are...
6
by: Richie | last post by:
I went through the past six months or so of entries in c.l.javascript, and found a couple where people had expressed opinions about the value of supporting much older versions of Netscape and IE. ...
13
by: ima | last post by:
I've been studying a great book on css and now that I've put together a few pages using it, I'm finding out that my book needed one more very important chapter. Introducing css in the real world. ...
1
by: tonyaccess | last post by:
Hi, I hope you may be able to help a coding novice. I have a fairly simple db which extracts data to a report via a query, my problem is the report is three pages per record set and a total of...
133
by: Alan Silver | last post by:
Hello, Just wondered what range of browsers, versions and OSs people are using to test pages. Also, since I don't have access to a Mac, will I have problems not being able to test on any Mac...
4
by: m.shidoshi | last post by:
I was recently put in charge of heading up my company's website, and while I have a lot of experience on the design side of things, I'm still very new to the programming side. When I started, the...
13
by: Alan Silver | last post by:
Hello, I finally got around to buying a 2nd hand Mac, so I can test pages in the Mac-only browsers. It has IE5.2, although that hangs up every time I try to start it up, so I guess I won't be...
1
by: spoonybard | last post by:
Hi Everyone, I have a tableless website design and I am trying to add the feature to print the middle column content on one of my pages. The information that is being displayed is a two column...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.