2016-11-07 66 views
-2

我想删除左侧的空白,任何想法如何去做?我刚刚开始学习CSS,所以我有点困惑,我不知道为什么旁边的标签并不总是接触到文章标签。删除HTML文档中的文章和旁边的标签之间的空白

html, 
 
body { 
 
    margin: 0; 
 
    padding: 0; 
 
} 
 
header, 
 
footer { 
 
    padding: 1em; 
 
    color: #FFFFFF; 
 
    background-color: black; 
 
    clear: left; 
 
    text-align: center; 
 
} 
 
nav { 
 
    float: center; 
 
    margin: 0 auto; 
 
    padding: 1em; 
 
    border-bottom: 2px solid black; 
 
    text-align: center; 
 
    background-color: #F0F0F0; 
 
} 
 
nav u1 { 
 
    list-style-type: none; 
 
    padding: 0; 
 
} 
 
aside { 
 
    float: right; 
 
    margin: 0; 
 
    padding: 2em; 
 
    padding-bottom: 290px; 
 
    color: #6A5ACD; 
 
    background-color: #F0F0F0; 
 
} 
 
article { 
 
    border-right: 1px solid gray; 
 
    margin-right: 170px; 
 
    padding: 1em; 
 
    overflow: hidden; 
 
    background-color: #F0F0F0; 
 
} 
 
#Tablas { 
 
    text-align: center; 
 
} 
 
a:link { 
 
    color: #6A5ACD; 
 
    background-color: transparent; 
 
    text-decoration: none 
 
} 
 
a:visited { 
 
    color: #4B0082; 
 
    background-color: transparent; 
 
    text-decoration: none 
 
} 
 
a:hover { 
 
    color: #483D8B; 
 
    background-color: transparent; 
 
    text-decoration: underline 
 
} 
 
a:active { 
 
    color: yellow; 
 
    background-color: transparent; 
 
    text-decoration: underline 
 
}
<div class="container"> 
 
    <header> 
 
    <h1>Guia HTML</h1> 
 
    <img src="images.jpg"> 
 
    </header> 
 
    <nav> 
 
    <u1> 
 
     <a href="#Tablas">Tablas</a> 
 
     <a href="#CSS">CSS</a> 
 
     <a href="#Etiquetas">Etiquetas</a> 
 
    </u1> 
 
    </nav> 
 

 
    <aside> 
 
    <u2> 
 
     <p><a href="http://www.w3schools.com/html/html_tables.asp">Guia HTML</a> 
 
     </p> 
 
     <p><a href="http://www.w3schools.com/html/html_css.asp">Guia CSS</a> 
 
     </p> 
 
    </u2> 
 
    </aside> 
 

 
    <article> 
 
    <h2 id="Tablas">Tablas</h2> 
 
    <iframe src="https://actualidad.rt.com/ " height="300" width="1050"></iframe> 
 

 
    </article> 
 

 
    <footer> 
 
    <p>Copyright © Escola del treball 6204578 [email protected]</p> 
 
    </footer> 
 
</div>

+0

从'article'中删除'margin-right',那是你想要的吗? –

+0

是的,谢谢!另一件事,我不明白,如果我删除padding-bottom:290px;从旁边,底部有一个很大的空白区域,我该如何解决它? –

回答

0

您指定在CSS中的文章元件获得利润,只是将其删除。删除属性“margin-right:170px;”并检查结果。

+0

是的,谢谢!另一件事,我不明白,如果我删除padding-bottom:290px;从旁边,底部有一个很大的空白区域,我该如何解决它? –