Ive tied to make my website mobile-friendly and came acros this problem when i tried to see what the website would look like on mobile i came acros this margin that apearded is there a way to remove it?
我尝试添加宽度:100%,但似乎什么也没做这是代码
<body style="margin:0px; padding-left:0px; background-color: gray;">
<div id="div01">
<ul>
<li><a href="#">TEST</a></li>
<li><a href="#">TEST 2</a></li>
<li><a href="#">TEST 3</a></li>
<li><a href="#">TEST 4</a></li>
<div id ="div02">
<li><a href="#">TEST 5</a></li>
</ul>
</div>
*
{
padding: 0px;
margin: 0px;
}
@media only screen and (max-width: 360px)
{
div#div01 a
{
display: block;
color: white;
text-align: center;
padding: 20px;
text-decoration: none;
}
div#div01 li
{
float: left;
}
div#div01 ul
{
margin: 0px;
list-style-type: none;
overflow: hidden;
background-color: #333333;
padding-left: 0;
}
div#div01 a:hover
{
background-color: #444444;
}
div#div02 li
{
float: right;
}