I have a design in Figma that I want to convert to React using Tailwind CSS while maintaining 100% pixel-perfect accuracy. The design is created for a Macbook Pro 16 inch, which has a width of 1728px. However, I want to center the content within a customized container with a width of 1300px. This way, when viewed on a wider screen, the content will be centered within a 1300px container while the background extends to fill the remaining white space on either side.
Here are some specific instructions:
- The background should span the entire viewport width: To ensure that the background stretches to the full width of the browser window regardless of screen size
- The content container should have a max-width: Limiting the content inside a central container to 1300px prevents it from becoming too wide on larger screens, thus improving readability and layout control
- Center the content container: Keeping the container centered within the viewport when the screen width exceeds 1300px
What is the best method to achieve this?