Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

body tag is overflowing , not fitting with container

My html,body, wrapper width is 100%. When I test this with responsive mode , Inside wrapper every element is well fit and responsive .
But the width of body and wrapper is not same. At the right side theres 40px extra space creating .
I have checked every block,element layout by giving border color. All block are fits inside the wrapper but the html and body not fitting with the same width of wrapper. I tried to prevent this with overflow-x: hidden but nothing has changed.

html,body{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:"Varela Round",Sans-serif;
    font-size:1.125rem;
    height: auto;
    overflow-x:hidden;
}
.wrapper{
    width:100%;
    max-width:1348px;
    overflow-x:hidden;
} 

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You must use viewport height in body

body{
height: 100vh;
width: 100vw;
}

and in your wrapper:

.wrapper{
    width:100%;
    max-width:1348px;
    overflow-x:hidden;
} 
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading