How to Make Same Layout for All Web Pages

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:

  1. Build in a more-compliant and developer-friendly browser like firefox first, test thoroughly in IE (and safari/chrome(webkit) and opera) periodically.
  2. 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
  3. Use a reset style sheet. Note that depending on the sheet's contents this item may be incompatible with the goal of #2.
  4. Use a javascript framework like jQuery or Prototype - they can hide some javascript and DOM incompatibilities.
  5. Use good semantic layout- it's more likely to degrade nicely for a mis-behaving browser
  6. 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



Leave a reply



Submit