2017-05-14 19 views
0

提前致謝CSS Bootstrap - 刪除餘量

我正在開發一個.NET響應式網頁圖像和GridView。

我想刪除「grid.less」bootstrap文件中定義的「margin-left:auto」屬性,但沒有成功。 我已經嘗試過「margin-left:0px」,left:0px,也沒有成功。 這是我的頁面是如何: Page (sorry but i can't put the image in the post)

ASP.NET:

<div class="wrapper"> 
    <div class="global"> 
     <div class="itemwrapper"> 
      <img src="Content/logo.jpg" class="img-responsive" /> 
     </div> 
    (...) 

CSS:

.wrapper { 
    max-width: 1050px; 
    margin: 60px auto 60px auto; 
    } 
.global { 
    display: table; 
    width: 100%; 
    table-layout: fixed; 
    } 
.itemwrapper { 
    margin-left:0px; 
    display: table-cell; 
    vertical-align: top; 
    width: 100%; 
} 

你能幫助我嗎?謝謝!

+0

「[margin屬性】適用於所有元素,除了與表元素除table-caption,table和inline-table以外的顯示類型,換句話說,margin屬性不適用於display:table-cell元素。「你說Bootstrap,你不會在你的HTML標記中使用它。 – makshh

+0

嗨!我試圖「刪除」圖片中的邊距,而不是在我的表格中。 – Pickabull

+0

看起來你的圖片沒有空白(你的代碼中沒有關於這個的)。我申請了你的代碼,沒有保證金https://codepen.io/makshh/pen/XRYdKp – makshh

回答

0

只需您提供的代碼,我想你可以試試這個代碼:

.wrapper { 
    max-width: 1050px; 
    margin: 60px 0; 
} 

相反的:

.wrapper { 
    max-width: 1050px; 
    margin: 60px auto 60px auto; 
}