Start Free Trial
Come for the solution, stay for everything else.
Start Free Trial
form layout on IE and Firefox
I have a report that I created in PHP, its layout works perfectly when printed from IE, but when I print it in Mozilla, it prints in a different way.
How can I make that both printings come out the same way, so I can print this form independent from the Browser that the final user chooses.
I know this could be resolved with CSS, divs and font, and styles but I need the precise example please.
thanks as always experts.
8/22/2022 - Mon
just for example purposes, I would like a code that prints a form with the following elements:
1. Top Left: HELLO
2: Center Middle: GOOD MORNING
3: Bottom RIGHT: GOOD BYE
If I print one page in IE and the other in Firefox, I want the layout to be the same.
If I put both sheets of papers against white light, I could then be able to make an exact match of both printings when put one on the other.
The problem is margins from the browser itself. You can't change what the margins are on the browsers. People can make them what they want.
On that note, to make page layouts the same, you will need to specify positioning and margins/padding.
For example the body is treated different within browsers. To remedy this you can put this in your code:
As far as positioning, you will need to absolute position things:
The reason is browser interpret positioning different unless you specify exact pixels. Even then it'll get jacked up if you do not reset the margins and padding for all elements. IE is known for adding margins/padding when not told to. It's just how it works.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
ASKER CERTIFIED SOLUTION
Log in or sign up to see answer
Become an EE member today
7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
I agree, there will be no exact in this case. Close, yes. You need a print stylesheet. This is easier than you think. Can you provide a link to the page? If not, provide your browser output (browser parsed page).
Plans and Pricing
Certified Expert Program
© 1996-2022 Experts Exchange, LLC. All rights reserved. Covered by US Patent