\r\n \r\n ","upvoteCount":7},{"@type":"Answer","text":"body {\nmargin:0;\n}\n\nor\n\n*{\nmargin:0;\n}\n\nadd this on css","upvoteCount":4},{"@type":"Answer","text":"Css:\n body{\n margin: 0px;\n }\n\nTry this","upvoteCount":1},{"@type":"Answer","text":"Ahh it still wont work. Thank’s though! any other suggestions?","upvoteCount":1},{"@type":"Answer","text":"What's going on there is that there is an element that is positioned there, offscreen, with opacity: 0; so you can't see it. Normally that would trigger horizontal overflow and a horizontal scrollbar, but we're explicitly hiding it:\n\nbody { \noverflow-x: hidden;\n } \n.hidden-thing {\n position: absolute; \nleft: 100%; \nwidth: 50px; \nheight: 50px; \nopacity: 0;\n }","upvoteCount":1},{"@type":"Answer","text":"If u can then just share your code maybe it will help to figure out the problem","upvoteCount":1},{"@type":"Answer","text":"kyle if your project is on github send me the link i can help you figure out the problem\n\nthought thing I mentioned above always work for me","upvoteCount":1},{"@type":"Answer","text":"body,*{\nmargine:0;\npadding:0;\noutlign:0;\nborder:0;\n}","upvoteCount":1},{"@type":"Answer","text":"Along with setting the margin to 0, you could also try setting the padding of all elements to 0:\n\n*{\n padding: 0;\n margin: 0;\n}","upvoteCount":0},{"@type":"Answer","text":"still not working :/","upvoteCount":0}]}
}
+ 3
Using Full width isn’t working.
I assigned most div elements in my website with “width:100%” yet when I scroll it still shows empty white on the sides and it is not stuck to the edges as I would like it to be. How can I fix this? I am using HTML and css
body {
margin:0;
}
or
*{
margin:0;
}
add this on css
4th Jun 2018, 3:53 AM
Sudarshan Rai
M
+ 1
Css:
body{
margin: 0px;
}
Try this
4th Jun 2018, 3:53 AM
Rohit
+ 1
Ahh it still wont work. Thank’s though! any other suggestions?
4th Jun 2018, 3:56 AM
Kyle
+ 1
What's going on there is that there is an element that is positioned there, offscreen, with opacity: 0; so you can't see it. Normally that would trigger horizontal overflow and a horizontal scrollbar, but we're explicitly hiding it:
body {
overflow-x: hidden;
}
.hidden-thing {
position: absolute;
left: 100%;
width: 50px;
height: 50px;
opacity: 0;
}
4th Jun 2018, 4:30 AM
prachal goyal
+ 1
If u can then just share your code maybe it will help to figure out the problem
4th Jun 2018, 4:35 AM
Rohit
+ 1
kyle if your project is on github send me the link i can help you figure out the problem
thought thing I mentioned above always work for me