in Education by
My website is pixel perfect in firefox but it does not show its real look in google chrome, but I use bootstrap-4 and responsive breakpoints for my website . But why they are not working properly? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
This is asked over and over again (with different combinations of browsers and rendering engines). But there's not really an answer. Instead, here are a few things to keep in mind to make your work look more similar across MOST popular browsers and devices. One There's no such thing as complete pixel perfection. Period. Even if you manage to get hit a point where a screenshot laid over the top of the source material (Photoshop, Sketch, etc) is exactly perfect, you could go to a different computer (same browser and source material) and not have it line up. But even that's unlikely as something like a Photoshop file by definition can't be responsive. Two You CAN level the playing field to make most browsers treat your code similarly. To do this, you need to understand that each browser has different defaults and then REMOVE those defaults so that your CSS represents the final solution. There are two typical ways to do this: CSS Resets - these remove ALL styling and force you to build up everything. CSS Normalize - which attempts to make the base styling THE SAME across all browsers. (I use a normalize in EVERY project I do) Three Learn about the CSS box-model. The relates to how browsers deal with the "boxes" of margin/padding/content that make up a rendered HTML page. The box model a browser is using, impacts sizes and spacing. A Normalize will typically fix this, but many browsers use different box models by default. It's also worth paying attention to screen pixel densities (this impacts anything with fixed sizes) and converting to percentage-based sizing (rem, vh/vw, %) so that all devices start to render things as close to what you wanted as possible. Four Get to know each browser's capabilities and plan fallbacks or shims to restore/add functionality in those cases. First, check what you're trying to use with caniuse.com This will tell you if you need to use a fallback, detect missing features or just accept the fact that it won't work exactly like you want it to everywhere.

Related questions

0 votes
    How to identify the most trending pages on my website in Google Analytics?...
asked Oct 3, 2020 in Technology by JackTerrance
0 votes
    As the title says, why does my html template look different on three different screen sizes? I understand ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    What are Different qualification between a related rotate toward the sky and isolates look upward?...
asked Jun 7, 2021 in Technology by JackTerrance
0 votes
    A graphical or text depiction of the relationship between different groups of content on a website is ... Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    A graphical or text depiction of the relationship between different groups of content on a website is a: ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    Goo,gle Chrome, Safari, Firefox, and Explorer are different types of what? Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    How do I support redundancy on my OpenID login website? For instance, I have users that demand 100% uptime ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 13, 2022 in Education by JackTerrance
0 votes
    How do I support redundancy on my OpenID login website? For instance, I have users that demand 100% uptime ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 13, 2022 in Education by JackTerrance
0 votes
    I'm building an app using Visual Studio 2010. I can run my asp.net website from my computer (by ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
0 votes
    I have one script and many websites, because they are on the same server how can I execute same ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I have one script and many websites, because they are on the same server how can I execute same ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    Friends, I have a contact us/Inquiry form in my website. I want to generate a lead in Sales force CRM on ... any link for API. Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    How can you identify the keywords that are sending paid traffic to my website?...
asked Oct 3, 2020 in Technology by JackTerrance
0 votes
    How can you identify the keywords that are sending paid traffic to my website?...
asked Oct 3, 2020 in Technology by JackTerrance
...