Why is there a distance between my div and parent div? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:09:22
Original
1005 people have browsed it


            
                
                1.Select Room
                2.Customer Info
                3.Payment
                
            


            
            


不明白红色的那两个div之间为什么会有一段空白距离?


回复讨论(解决方案)

里面的ul会有默认的margin和padding,设为0就没了。

里面的ul会有默认的margin和padding,设为0就没了。
原来这样呀,谢谢。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>    <title></title>   </head><body><div style='border:solid 1px blue;width:600px;float:right;'><div style="height:30px;width:600px;background-color:#626262;color:#ffffff;margin-top:0px;float:right; ">  <ul id="steptips" style="list-style-type:none;">  <li class="horizontal" style="display:inline;margin:auto 10px;padding:auto 8px;color:red;">1.Select Room</li>  <li class="horizontal" style="display:inline;margin:auto 10px;padding:auto 8px;color:white;">2.Customer Info</li>  <li class="horizontal" style="display:inline;margin:auto 10px;padding:auto 8px;color:white;">3.Payment</li>  </ul>  </div>  <div style="width:600px;margin:auto;">  </div></div></body></html>
Copy after login

这样吗?

Related labels:
source:php.cn
Previous article:360 browser compatibility issues_html/css_WEB-ITnose Next article:Problem with embedded table in html table_html/css_WEB-ITnose
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template