I am facing another issue. I have created a #wrapper on my page to manage the width of the content, but... It does not work properly on screens larger than 1366px.
When tested on a 1920 screen, the debugger showed that the total width of the wrapper was only 1244px (not 1920px). The same problem occurred on a 4k TV - the page appeared "scaled" to the wrapper width. It seems like the full width of the page is being controlled by the wrapper and any 'width: 100%' settings on body/sections are being ignored.
Do you have any idea where the issue might be? Setting !important on the wrapper hasn't made a difference, max/min width is not working either. Changing units to vw has not solved it. Even removing/changing meta tags did not help. And there are no other tags overriding the wrapper. The styles were cleared using SCSS Reset at the beginning. What could I possibly be doing wrong?
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
.aaa {
width: 100%;
height: 300px;
}
#wrapper {
width: 1224px !important;
margin: 0 auto !important;
}
<html>
<head>
<meta http-equiv="content-type" content="text/html" charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<section class="aaa">
<div id="wrapper">
<h2>content</h2>
</div>
</section>
</body>
</html>
The desired setup should look like this:
[-margin-[-wrapper 1224px-]-margin-]
[------------------1920px-----------------]
However, on a 1920px resolution screen, it currently looks like this:
[--wrapper 1224px----]
[-1224px in debugger-]
Even with a screen resolution of 1920px
Here is a link to the troubled page: www.xileo.pl
And here is an image from a 4k screen:https://i.sstatic.net/ZH4UR.jpg
As depicted in the image from a 3840px screen, the wrapper was scaled to 3840px instead of remaining at 1224px with margins. I want the wrapper to stay at 1224px with margins.