Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html, body, and div set at 100% width but it's still not taking the full 100%

Tags:

html

css

width

I reset the margins and padding to 0. I set the <html>, <body> width to 100%.

My CSS looks something like this:

html, body { 
    margin:0;
    padding:0;
    width:100%;
}

#wrapper {
    margin:0;
    padding:0;
    width:100%;
    background-color:#ccc;
}

Whenever I resize the browser to the point I get a horizontal scroll bar the div doesn't take the full 100% width. Not even the body or html. I have firebugged it and there's about a 180px gap.

enter image description here

like image 427
J.S Avatar asked Dec 11 '22 23:12

J.S


1 Answers

You can use overflow for that

html, body { 
margin:0;
padding:0;
width:100%;
height:100%;
overflow: auto;
}

I also faced similar issue and i used this

like image 166
rawoof ahamed Avatar answered Dec 29 '22 00:12

rawoof ahamed