How to create multiple HTML pages with same layout?
Creating multiple HTML pages with the same layout is exactly the reason why frameworks such vuejs and react are so popular. if you are new in web dev I can recommend you vuejs. It's very easy to learn.
How can I achieve a consistent layout in all browsers?
I find the best policy to avoid pain is to follow these rules:
- Build in a more-compliant and developer-friendly browser like firefox first, test thoroughly in IE (and safari/chrome(webkit) and opera) periodically.
- Use a strict doctype- you don't necessarily need perfect markup, but it should be very good — good enough to avoid browser quirks modes, since quirks are by definition not standard
- Use a reset style sheet. Note that depending on the sheet's contents this item may be incompatible with the goal of #2.
- Use a javascript framework like jQuery or Prototype - they can hide some javascript and DOM incompatibilities.
- Use good semantic layout- it's more likely to degrade nicely for a mis-behaving browser
- Accept that it won't be perfect and don't sweat the really small variances
Follow those rules and there aren't as many problems in the first place.
For a TODO reference, see this question:
https://stackoverflow.com/questions/72394/what-should-a-developer-know-before-building-a-public-web-site
Related Topics
Div: After - Add Content After Div
Image Align Attribute in HTML 5
Copy Chrome Default Input's Outline Style
Sass "Error: Can't Find Stylesheet to Import."
CSS - Internet Explorer and The <Main> Tag Background
Preventing Page Breaks in a Table When Printing
Filling Remaining Vertical Space
What's The Correct Way to Set a Base Rem Value in CSS
What Are Alternatives to The Span-Element
Touchmove Pointer-Events: None CSS Doesn't Work on Chrome for Android 4.4/Chromeview
Resize Font Depending on String Length
How Debug Placeholder Pseudo Element in Firefox
Strange Styling Through Injected Stylesheets in Chrome
How to Say "Use The Current Font Weight" Without Making It Lighter/Bolder