I am creating a website that is suitable for the screen using Wordpress.
When the site owner logs in, the admin panel appears, but adds the following style:
html{ margin-top: 28px !important; }
This will cause a vertical scrollbar to appear. Is there a way to fix this using only CSS?
Someone had a similar problem , but he received no response.
My corresponding html structure:
<html>
<body>
<div id="page">
<div class="site-main" id="main">
<div class="content-area" id="primary">
<div role="main" class="site-content" id="content">
</div>
</div>
</div>
</div>
<div id="wpadminbar">
</div>
</body>
</html>
And the corresponding CSS:
html, body, #page {
width: 100%;
height: 100%;
min-width: 350px;
margin: 0;
padding: 0;
}
#main {
height: 100%;
}
#primary {
float: right;
width: 100%;
margin-left: -200px;
height: 100%;
}
#content {
margin-left: 250px;
height: 100%;
}
For admin panel:
#wpadminbar {
height: 28px;
left: 0;
min-width: 600px;
position: fixed;
top: 0;
width: 100%;
z-index: 99999;
}
I tried using (negative) fields and paddings, also setting the admin panel positionon absoluteinstead fixed, but no luck.