www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Thread: How do I assign a page break in FrontPage so that it prints the way I want on the web

  1. #1
    Join Date
    Dec 2002
    Posts
    23

    How do I assign a page break in FrontPage so that it prints the way I want on the web

    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.

  2. #2
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    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>

  3. #3
    Join Date
    Dec 2002
    Posts
    23

    Page Break

    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.

  4. #4
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    2,653
    here use it this way

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

    Khalid

  5. #5
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    2,653
    oops..
    the above will apply page break after a <p></p> tag.

    Khalid

  6. #6
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    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.

  7. #7
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    khalidali63 -

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

  8. #8
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    2,653
    ofcourse it will,I was just giving an example of actual implementation..:-)

    Khalid

  9. #9
    Join Date
    Dec 2002
    Posts
    23

    Page Break in FrontPage

    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?

  10. #10
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    It will only work when you print it. Not when you prievew it in your browser.

  11. #11
    Join Date
    Dec 2002
    Posts
    23
    <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
    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?

  12. #12
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    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.
    Code:
    <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.

  13. #13
    Join Date
    Dec 2002
    Posts
    23
    <!--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 Why does it do that? Any clue?

  14. #14
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    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.

  15. #15
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    2,653
    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?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles