Controlling page margins

Discussion in 'HTML' started by Russell Campbell, Aug 29, 2006.

  1. I need to control the page margins when the user prints the page from the
    browser. It looked like the @page CSS2 command would do it, but it doesn't
    seem to work in IE 6. Perhaps that's because IE 6 does not handle CSS2 (I'm
    not sure if it doesn't handle it at all or just doesn't handle it well). Or
    perhaps the margins that can be controlled via @page are not the printer
    margins. Basically the printer uses about a half-inch margin and I need to
    go to 1/4 inch or so. Can this be done via HTML, CSS, or JavaScript?

    Russell Campbell
    Russell Campbell, Aug 29, 2006
    #1
    1. Advertising

  2. Russell Campbell

    Andy Dingley Guest

    Russell Campbell wrote:

    > I need to control the page margins


    > Can this be done via HTML, CSS, or JavaScript?


    You can do it with an ActiveX - usual caveats apply.
    Search for MeadCo ScriptX (maybe others too)
    Andy Dingley, Aug 29, 2006
    #2
    1. Advertising

  3. Thanks. I was hoping to avoid that. I'm still trying to figure out if CSS2
    can do it.

    "Andy Dingley" <> wrote in message
    news:...
    >
    > Russell Campbell wrote:
    >
    >> I need to control the page margins

    >
    >> Can this be done via HTML, CSS, or JavaScript?

    >
    > You can do it with an ActiveX - usual caveats apply.
    > Search for MeadCo ScriptX (maybe others too)
    >
    Russell Campbell, Aug 29, 2006
    #3
  4. Russell Campbell wrote:

    Please don't top post.

    > Thanks. I was hoping to avoid that. I'm still trying to figure out if
    > CSS2 can do it.


    CSS 2 can. IE doesn't support that bit of CSS 2.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Aug 29, 2006
    #4
  5. >> CSS 2 can. IE doesn't support that bit of CSS 2

    I was kind of thinking that . . .

    >> Please don't top post.


    I don't know what you're talking about.


    "David Dorward" <> wrote in message
    news:ed24ls$qsb$1$...
    > Russell Campbell wrote:
    >
    > Please don't top post.
    >
    >> Thanks. I was hoping to avoid that. I'm still trying to figure out if
    >> CSS2 can do it.

    >
    > CSS 2 can. IE doesn't support that bit of CSS 2.
    >
    > --
    > David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    > Home is where the ~/.bashrc is
    Russell Campbell, Aug 30, 2006
    #5
  6. Oh, did you mean don't put my reply at the top like I'm doing here?

    "David Dorward" <> wrote in message
    news:ed24ls$qsb$1$...
    > Russell Campbell wrote:
    >
    > Please don't top post.
    >
    >> Thanks. I was hoping to avoid that. I'm still trying to figure out if
    >> CSS2 can do it.

    >
    > CSS 2 can. IE doesn't support that bit of CSS 2.
    >
    > --
    > David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    > Home is where the ~/.bashrc is
    Russell Campbell, Aug 30, 2006
    #6
  7. Russell Campbell wrote:

    [David Dorward wrote:]
    >>> Please don't top post.

    >
    > I don't know what you're talking about.


    open the front cover and begin reading there?
    the back cover and end up at the front or do you
    chapter one or do you start somewhere near
    When reading a book, do you start at

    http://oakroadsystems.com/genl/unice.htm#upside

    --
    -bts
    -Motorcycles defy gravity; cars just suck.
    Beauregard T. Shagnasty, Aug 30, 2006
    #7
  8. Russell Campbell wrote:
    >>> CSS 2 can. IE doesn't support that bit of CSS 2

    >
    > I was kind of thinking that . . .
    >
    >>> Please don't top post.

    >
    > I don't know what you're talking about.
    >


    Well I would think you could figure it out: "Top" and "Post", but you
    could also look it up:

    http://en.wikipedia.org/wiki/Top_posting
    Posting styles - Wikipedia, the free encyclopedia

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Aug 30, 2006
    #8
  9. In article <53ZIg.2906$>,
    "Russell Campbell" <> wrote:

    > I need to control the page margins when the user prints the page from the
    > browser. It looked like the @page CSS2 command would do it, but it doesn't
    > seem to work in IE 6. Perhaps that's because IE 6 does not handle CSS2 (I'm
    > not sure if it doesn't handle it at all or just doesn't handle it well). Or
    > perhaps the margins that can be controlled via @page are not the printer
    > margins. Basically the printer uses about a half-inch margin and I need to
    > go to 1/4 inch or so. Can this be done via HTML, CSS, or JavaScript?


    Hi Russell,
    Have you tried this?

    @media print {
    body {
    margin: 0px 0px 0px 0px;
    padding: 0px 0px 0px 0px;
    width: 100%;
    }
    }

    --
    Philip
    http://NikitaTheSpider.com/
    Whole-site HTML validation, link checking and more
    Nikita the Spider, Aug 30, 2006
    #9
  10. It appears you did not see my other reply where I realized what David meant.
    At first, I was thinking he was accusing me of modifying my system date to
    make sure my post appeared at the top of the list, then I realized what he
    meant.

    It's interesting how people want to dictate how you post because that's the
    way they post. One thing I've noticed in many years on the Web is that
    there are many preferences on this issue and it's kind of silly to try to
    make people post the way you want them to. Why is your way correct and mine
    not? In my experience, most people "top post", but switch to "mixed
    posting" (to make up a term meaning quote/reply/quote/reply etc.) when the
    original post is long and contains many points (I do this sometimes). In
    quite a number of different forums I find that top posting and mixed posting
    are most prevelent, with "bottom posting" being used (but IMHO it's the most
    irritating). I think you have to allow for people to post the way they want
    to. It's irritating when people jump on this issue in such a small minor
    post as this was. At least in a longer submission I could understand the
    desire for mixed posting, but in this little thread they need everything
    requoted? I sure don't understand why. Really . . . you can't dictate
    people's styles. Sorry if you don't like it, but I live with other people's
    posting styles and resist lecturing, so why can't you (granted, you weren't
    the one that told me how to post, but you did chime in). I do have to
    resist the temptation to request a certain style when people bottom post.
    When the orginal post was long, it's really irritating to have to constantly
    scroll down to see the latest response, especially as it gets copied with
    replies and the latest reply is way down the page. An in e-mail, top
    posting is very, very common. The main thing is that I can remember what I
    said and I don't need people to do the quote/reply thing. I just want to
    get their response (but, as I mentioned, in long postings or e-mails
    quote/reply is fine). Your preference for mixed posting is fine, but trying
    to make people post a certain way is really just a waste of time.

    "Beauregard T. Shagnasty" <> wrote in message
    news:AlgJg.727145$...
    > Russell Campbell wrote:
    >
    > [David Dorward wrote:]
    >>>> Please don't top post.

    >>
    >> I don't know what you're talking about.

    >
    > open the front cover and begin reading there?
    > the back cover and end up at the front or do you
    > chapter one or do you start somewhere near
    > When reading a book, do you start at
    >
    > http://oakroadsystems.com/genl/unice.htm#upside
    >
    > --
    > -bts
    > -Motorcycles defy gravity; cars just suck.
    Russell Campbell, Aug 30, 2006
    #10
  11. I did figure it out a moment later. I was thinking of another, more
    irritating and serious issue.

    BTW, do you always answer people in such a condescending and snotty manner?


    "Jonathan N. Little" <> wrote in message
    news:45393$44f596ca$40cba7af$...
    > Russell Campbell wrote:
    >>>> CSS 2 can. IE doesn't support that bit of CSS 2

    >>
    >> I was kind of thinking that . . .
    >>
    >>>> Please don't top post.

    >>
    >> I don't know what you're talking about.
    >>

    >
    > Well I would think you could figure it out: "Top" and "Post", but you
    > could also look it up:
    >
    > http://en.wikipedia.org/wiki/Top_posting
    > Posting styles - Wikipedia, the free encyclopedia
    >
    > --
    > Take care,
    >
    > Jonathan
    > -------------------
    > LITTLE WORKS STUDIO
    > http://www.LittleWorksStudio.com
    Russell Campbell, Aug 30, 2006
    #11
  12. Russell Campbell wrote:
    > I did figure it out a moment later. I was thinking of another, more
    > irritating and serious issue.
    >
    > BTW, do you always answer people in such a condescending and snotty manner?
    >

    *PLONK!*
    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Aug 30, 2006
    #12
  13. Russell Campbell wrote:

    > It's interesting how people want to dictate how you post


    When in Rome ...

    --
    -bts
    -Motorcycles defy gravity; cars just suck.
    Beauregard T. Shagnasty, Aug 30, 2006
    #13
  14. Truly, you prove my point . . .

    "Jonathan N. Little" <> wrote in message
    news:53cde$44f60f97$40cba7af$...
    > Russell Campbell wrote:
    >> I did figure it out a moment later. I was thinking of another, more
    >> irritating and serious issue.
    >>
    >> BTW, do you always answer people in such a condescending and snotty
    >> manner?
    >>

    > *PLONK!*
    > --
    > Take care,
    >
    > Jonathan
    > -------------------
    > LITTLE WORKS STUDIO
    > http://www.LittleWorksStudio.com
    Russell Campbell, Aug 31, 2006
    #14
  15. It's just that the Romans can't agree, either.

    "Beauregard T. Shagnasty" <> wrote in message
    news:FvoJg.11072$...
    > Russell Campbell wrote:
    >
    >> It's interesting how people want to dictate how you post

    >
    > When in Rome ...
    >
    > --
    > -bts
    > -Motorcycles defy gravity; cars just suck.
    Russell Campbell, Aug 31, 2006
    #15
  16. On 2006-08-30, Russell Campbell wrote:
    >
    > It's interesting how people want to dictate how you post because that's the
    > way they post.


    It's interesting that people generally post in a sensible manner.

    > One thing I've noticed in many years on the Web is that there are
    > many preferences on this issue and it's kind of silly to try to make
    > people post the way you want them to.


    Usenet is *not* the Web.

    > Why is your way correct and mine not?


    Why does 1 plus 1 equal 2 and not 3?

    > In my experience, most people "top post",


    Not in Usenet, and not, in my experience in e-mail either, though
    unfortunately it is becomming more common.

    > but switch to "mixed posting" (to make up a term meaning
    > quote/reply/quote/reply etc.) when the original post is long and
    > contains many points (I do this sometimes).


    That makes sense. Put your reply after the relevant section.

    > In quite a number of different forums I find that top posting and
    > mixed posting are most prevelent, with "bottom posting" being used
    > (but IMHO it's the most irritating).


    Forums are not Usenet.

    > I think you have to allow for people to post the way they want to.


    Sure, if they want to be corrected or ignored.

    > It's irritating when people jump on this issue in such a small minor
    > post as this was. At least in a longer submission I could understand
    > the desire for mixed posting, but in this little thread they need
    > everything requoted?


    In Usenet, you have no idea whether the reader has even seen any
    previous posts, or whether they are available, or whether he
    remembers it, after poerhaps having read dozens (or even hundreds)
    of other posts before returning to the thread.

    > I sure don't understand why.


    Try harder.

    > Really . . . you can't dictate people's styles. Sorry if you don't
    > like it, but I live with other people's posting styles and resist
    > lecturing, so why can't you (granted, you weren't the one that told
    > me how to post, but you did chime in). I do have to resist the
    > temptation to request a certain style when people bottom post. When
    > the orginal post was long, it's really irritating to have to
    > constantly scroll down to see the latest response, especially as it
    > gets copied with replies and the latest reply is way down the page.


    It helps to use a good newsreader. I just press tab to go directly
    to the new material, no matter how long the post is. Even without
    that, it's rare for more than two or three keystrokes to be
    required to get to the bottom.

    > An in e-mail, top posting is very, very common.


    It's getting that way, unfortunately.

    > The main thing is that I can remember what I said and I don't need
    > people to do the quote/reply thing.


    Perhaps you don't say very much? In a newsgroup, ythere may be
    many pespondents, not just you. It is much easier if one can read
    the replies chronologically.

    > I just want to get their response (but, as I mentioned, in long
    > postings or e-mails quote/reply is fine). Your preference for mixed
    > posting is fine, but trying to make people post a certain way is
    > really just a waste of time.


    Not posting logically is a waste of many more people's time.

    --
    Chris F.A. Johnson <http://cfaj.freeshell.org>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
    Chris F.A. Johnson, Aug 31, 2006
    #16
  17. Again, it just comes down to your opinion. Sure, people can ignore my
    posts. If they do that then I'm not bothered. The Internet is a big place
    with lots of people willing to help out instead of just arguing over
    something like this. What bothers me is that someone jumped on me for top
    posting in a very short post. One other person who chimed in posted a link
    to try to justify his opinion and in that very link it said on short
    messages it really doesn't matter, so his attempts to justify his opinion
    actually supported the fact that he should have just kept quiet. And then
    another person chmied in with a condescending and snotty response. Call me
    crazy, but it seems that if he wants to win people over to his way of seeing
    things that it might be a bad idea to start off by insulting them. His
    response was to insult me again (or just a notification he was going to kill
    filter me, depending on the meaning of his acronym). This person just comes
    across as someone who starts off in an arrogant fashion and runs off pouting
    when he doesn't get his way. Do you think I care if he is filtering me?
    That guy had nothing intelligent to say. Your reply was thought out, at
    least, and addressed my statements, though it did have a touch of an
    attitude, also, with the "1 + 1" comment and the "try harder" comment.

    I did use the word "Web" imprecisely. I should have type Internet. I also
    used the word forum as a general term for a place where people can have a
    community discussion. So I was talking about what the Internet brings us
    and allow us to participate in and that takes many forms.

    I've participated a good bit in newsgroups, though not as much these days
    for various reasons. I've never had people jump on me for posting styles.
    I've not jumped on them, either. To each his own (except in this NG where
    it seems that if the people don't get their way, they won't talk to you).

    "Chris F.A. Johnson" <> wrote in message
    news:...
    > On 2006-08-30, Russell Campbell wrote:
    >>
    >> It's interesting how people want to dictate how you post because that's
    >> the
    >> way they post.

    >
    > It's interesting that people generally post in a sensible manner.
    >
    >> One thing I've noticed in many years on the Web is that there are
    >> many preferences on this issue and it's kind of silly to try to make
    >> people post the way you want them to.

    >
    > Usenet is *not* the Web.
    >
    >> Why is your way correct and mine not?

    >
    > Why does 1 plus 1 equal 2 and not 3?
    >
    >> In my experience, most people "top post",

    >
    > Not in Usenet, and not, in my experience in e-mail either, though
    > unfortunately it is becomming more common.
    >
    >> but switch to "mixed posting" (to make up a term meaning
    >> quote/reply/quote/reply etc.) when the original post is long and
    >> contains many points (I do this sometimes).

    >
    > That makes sense. Put your reply after the relevant section.
    >
    >> In quite a number of different forums I find that top posting and
    >> mixed posting are most prevelent, with "bottom posting" being used
    >> (but IMHO it's the most irritating).

    >
    > Forums are not Usenet.
    >
    >> I think you have to allow for people to post the way they want to.

    >
    > Sure, if they want to be corrected or ignored.
    >
    >> It's irritating when people jump on this issue in such a small minor
    >> post as this was. At least in a longer submission I could understand
    >> the desire for mixed posting, but in this little thread they need
    >> everything requoted?

    >
    > In Usenet, you have no idea whether the reader has even seen any
    > previous posts, or whether they are available, or whether he
    > remembers it, after poerhaps having read dozens (or even hundreds)
    > of other posts before returning to the thread.
    >
    >> I sure don't understand why.

    >
    > Try harder.
    >
    >> Really . . . you can't dictate people's styles. Sorry if you don't
    >> like it, but I live with other people's posting styles and resist
    >> lecturing, so why can't you (granted, you weren't the one that told
    >> me how to post, but you did chime in). I do have to resist the
    >> temptation to request a certain style when people bottom post. When
    >> the orginal post was long, it's really irritating to have to
    >> constantly scroll down to see the latest response, especially as it
    >> gets copied with replies and the latest reply is way down the page.

    >
    > It helps to use a good newsreader. I just press tab to go directly
    > to the new material, no matter how long the post is. Even without
    > that, it's rare for more than two or three keystrokes to be
    > required to get to the bottom.
    >
    >> An in e-mail, top posting is very, very common.

    >
    > It's getting that way, unfortunately.
    >
    >> The main thing is that I can remember what I said and I don't need
    >> people to do the quote/reply thing.

    >
    > Perhaps you don't say very much? In a newsgroup, ythere may be
    > many pespondents, not just you. It is much easier if one can read
    > the replies chronologically.
    >
    >> I just want to get their response (but, as I mentioned, in long
    >> postings or e-mails quote/reply is fine). Your preference for mixed
    >> posting is fine, but trying to make people post a certain way is
    >> really just a waste of time.

    >
    > Not posting logically is a waste of many more people's time.
    >
    > --
    > Chris F.A. Johnson <http://cfaj.freeshell.org>
    > ===================================================================
    > Author:
    > Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
    Russell Campbell, Aug 31, 2006
    #17
  18. I'm not sure this will help, even if IE 6 handled it properly. Is this
    going to make the printer start printing at the very edge of the page with
    the 0px value (which most laser printers can't do, anyway)? What I need is
    to tell the printer to use about a 1/4 inch margin, which most laser
    printers can do. I think the main problem right now is IE's poor support of
    CSS2.

    Thanks for your reply.

    "Nikita the Spider" <> wrote in message
    news:NikitaTheSpider-

    > Hi Russell,
    > Have you tried this?
    >
    > @media print {
    > body {
    > margin: 0px 0px 0px 0px;
    > padding: 0px 0px 0px 0px;
    > width: 100%;
    > }
    > }
    >
    > --
    > Philip
    > http://NikitaTheSpider.com/
    > Whole-site HTML validation, link checking and more
    Russell Campbell, Aug 31, 2006
    #18
  19. In article <WqqJg.3804$>,
    "Russell Campbell" <> wrote:
    > "Nikita the Spider" <> wrote in message
    > news:NikitaTheSpider-
    >
    > > Hi Russell,
    > > Have you tried this?
    > >
    > > @media print {
    > > body {
    > > margin: 0px 0px 0px 0px;
    > > padding: 0px 0px 0px 0px;
    > > width: 100%;
    > > }
    > > }
    > >

    >
    > I'm not sure this will help, even if IE 6 handled it properly. Is this
    > going to make the printer start printing at the very edge of the page with
    > the 0px value (which most laser printers can't do, anyway)? What I need is
    > to tell the printer to use about a 1/4 inch margin, which most laser
    > printers can do. I think the main problem right now is IE's poor support of
    > CSS2.


    Well, if IE understands that, it's pretty easy to adjust it to whatever
    you want. 1pt = 1/72 of an inch, 25/72 = .35, so .35pt might get you the
    margins of 1/4 inch. I don't remember if that works under IE or not; I
    wrote that CSS a long time ago. Why not try it and report back to us?

    BTW, as with (many) others in the group, I find top posting pretty hard
    to read too.

    --
    Philip
    http://NikitaTheSpider.com/
    Whole-site HTML validation, link checking and more
    Nikita the Spider, Aug 31, 2006
    #19
  20. In article <okqJg.3799$>,
    "Russell Campbell" <> wrote:

    > Again, it just comes down to your opinion. Sure, people can ignore my
    > posts.


    This is a horse beaten by thousands of top posters for many many years.

    <algorithm>
    If you top post a reply, you will be corrected. Your question or comment
    will be drowned out with 'don't top post' replies. You will give a
    sanctimonious response. You will be corrected again. You will give a
    statement of your philosophy. You will be corrected again. You will
    learn, or you will leave.
    </algorithm>
    Another person top posts. GOTO: <algorithm>;
    I post to eleven groups. The above can be expected from all of them. I
    don't post to <news:alt.vampire.flonk.flonk.flonk> and don't know the
    rules there.

    leo

    --
    <http://web0.greatbasin.net/~leo/>
    Leonard Blaisdell, Aug 31, 2006
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Keith

    Setting margins on an ASP.NET page

    Keith, Nov 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    752
    Natty Gur
    Nov 4, 2003
  2. Chris D

    Re: Page Margins on an ASP.NET page

    Chris D, Nov 19, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    355
    Chris D
    Nov 19, 2003
  3. Bill Priess

    Re: Page Margins on an ASP.NET page

    Bill Priess, Nov 19, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    9,657
    Bill Priess
    Nov 19, 2003
  4. Ken Varn
    Replies:
    1
    Views:
    915
    Scott Allen
    May 6, 2005
  5. Page margins in Firefox

    , Oct 14, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    333
Loading...

Share This Page