Click to See Complete Forum and Search --> : How do I assign a page break in FrontPage so that it prints the way I want on the web


sudhir
12-30-2002, 05:00 PM
I am trying to design a website in FrontPage but cannot seem to get the printing right. I would like to know how to add a page break where I want it so that when someone prints the page from the web it looks the way I would like to see it print out. It is very critical if I have crossword puzzle with clues, or some such thing, that the puzzle does not get chopped off into 2!!!:(
How do I put in a page break for printing purposes?
Thanks.

pyro
12-30-2002, 05:19 PM
You will have to use CSS. Take a look at the following:

page-break-before
page-break-after
page-break-inside (probably what you will want)

With the following values

(all)
auto
avoid
inherit

(only with page-break-before and after)
aways
left
right

Try something like this...

<div style="page-break-inside: avoid;">
Page won't break here
</div>

sudhir
12-30-2002, 05:28 PM
I apologize but i do not understand what you are trying to explain. Would it be possible to just copy what you have written and paste it where I want a page break? Is that possible?
Thanks for helping me.:)

khalidali63
12-30-2002, 05:41 PM
here use it this way

<style>
p{
page-break-after:always;
}

Khalid

khalidali63
12-30-2002, 05:42 PM
oops..
the above will apply page break after a <p></p> tag.

Khalid

pyro
12-30-2002, 05:43 PM
Sorry, I didn't explain very well.

If you want your page to break before a certain point, add this code exactly where you want your page to break.
<div style="page-break-before: always;"></div>

So, you can copy that in where you want your page to break. :)

pyro
12-30-2002, 05:45 PM
khalidali63 -

Won't that force a page break at every <p>? That's why I used a <div>

khalidali63
12-30-2002, 06:20 PM
ofcourse it will,I was just giving an example of actual implementation..:-)

Khalid

sudhir
12-30-2002, 07:24 PM
I added the line where I wanted the page break
<div style="page-break-before:
always;"></div>
but in preview browser it did not divide the page where I wanted for printing purposes:(
Any other suggestion? What am I doing wrong?

pyro
12-30-2002, 10:09 PM
It will only work when you print it. Not when you prievew it in your browser.

sudhir
12-31-2002, 05:20 AM
<span style='font-size:10.0pt;font-family:Verdana;
mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:"Times New Roman";
mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA'>&lt;div
style=&quot;page-break-before: always;&quot;&gt;&lt;/div&gt;</span>

When I tried to add the simple page break 1 liner you suggested, I ended up with the above - I copied and pasted one line and this is what my html translated it into:confused:
Why does it do that? It also keeps adding "&nbsp;"("and" sign and letters n,b,s,p, and a semicolon) for every space in my text (which I do not see in other website's html pages!) Where am I going wrong? Is some setting wrong on my computer? Can it be fixed? Because it is difficult to understand my own html!!! Most html are so easy to understand (except mine!!!) How does one clean up html like the mess above?

pyro
12-31-2002, 07:13 AM
Where are you located? It looks like it is trying to tell it to use English.

What do you use to make your pages? If you try hard coding a page does it to it? Try copying this into a simple text editor, and save the file as an HTML document.
<html>
<head>
</head>
<body>
<div style"color:red">This is to check what it does to the formatting.</div>
</body>
</html>
If that messes up, it is something that your browser is doing, but I'm guessing it is something that whatever you are using to code you pages is doing.

sudhir
12-31-2002, 09:21 AM
<!--StartFragment -->
<blockquote><pre>&lt;html&gt;
&lt;head&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div style"color:red"&gt;This is to check what it does to the formatting.&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;<hr></pre></blockquote>

I posted the code you gave me in word and saved it as an html and it was the exact same thing. I saved it in FrontPage and the above is what I got:( :confused: Why does it do that? Any clue?

pyro
12-31-2002, 10:09 AM
Originally posted by sudhir
Why does it do that? Any clue?
Yeah, what it is doing is making it so you can see the html on you finished page. For instance &lt;head&gt; equals <head> on your finished page.

&lt; = <
&gt; = >

For some reason FrontPage does this when you copy code from these forums. Try copying the code into a plain text editor, then re-copy from there into FrontPage. Should work fine.

khalidali63
12-31-2002, 11:05 AM
Typcally if it works it should display in the print preview as well.

and for the above copying problem just copy it to notepad and then from there copy it to frontpage...or try to figure out the configuration that causes it..
:-)
Which IE browser version are you using?

sudhir
12-31-2002, 11:17 AM
Ie 6.0 version and netscape 7.0 version
It does not show it in the preview browser in print preview mode!

khalidali63
12-31-2002, 11:53 AM
there must be some other part of your code that is not allowing this..you have link to your page that you want to print?
or post ur code...
IE 6 will print.

Khalid