2017-05-02 62 views
0

你好,我是在工作,在頁面上我都用使用HTML和CSS如何完全刪除的利潤率,使格全寬

網格工作正常的2列和1列響應網格,但我已經注意到這個網格的左邊和右邊有一個邊緣。我

<style> 
/* SECTIONS */ 
.section { 
    clear: both; 
    padding: 0px; 
    margin: 0px; 
} 

/* COLUMN SETUP */ 
.col { 
    display: block; 
    float:left; 
    margin: 1% 0 1% 0%; 
} 
.col:first-child { margin-left: 0; } 

/* GROUPING */ 
.group:before, 
.group:after { content:""; display:table; } 
.group:after { clear:both;} 
.group { zoom:1; /* For IE 6/7 */ } 

/* GRID OF TWO */ 
.span_2_of_2 { 
    width: 100%; 
} 
.span_1_of_2 { 
    width: 50%; 
} 

/* GO FULL WIDTH AT LESS THAN 480 PIXELS */ 

@media only screen and (max-width: 480px) { 
    .col { 
     margin: 1% 0 1% 0%; 
    } 
} 

@media only screen and (max-width: 480px) { 
    .span_2_of_2, .span_1_of_2 { width: 100%; } 
} 

</style> 


<div class="section group"> 
    <div class="col span_1_of_2"> 
    This is column 1 
    </div> 
    <div class="col span_1_of_2"> 
    This is column 2 
    </div> 
</div> 

與與世無爭和padding都設置爲零

我試圖消除這種空間,但dsent工作,請我如何能確保我的網格的左邊和右邊這個利潤率已關閉。 這是該頁面的鏈接和截圖太

http://andymurphy.tv/index.php/landing/ 

enter image description here

+0

它看起來像你有一個規則設置頁邊距爲自動被設置每個保證金爲2048像素什麼都原因...'.tve_lp_hybrid-homepage2 .tve_content_width, .tve_lp_hybrid-homepage2 .thrv_page_section .out .in' – Marie

+0

它的模板,它是默認設置的,hw我是否騎過這個 –

+0

你想要它全屏嗎? – blecaf

回答

0

您的模板是給予該填充。要覆蓋它使用

<div class="pswr out" style="background-color: #EAEAEA"> 
    <div class="in darkSec pddbg"> 
     <div class="thrv_wrapper thrv_custom_html_shortcode"> 
      <div class="section group"> 
       <div class="col span_1_of_2"> 
        This is column 1 
       </div> 
       <div class="col span_1_of_2"> 
        This is column 2 
       </div> 
      </div> 
     </div> 
    </div> 
</div> 
+0

謝謝,我試了一下,它沒有工作 –

+0

你想它全屏嗎? – blecaf

+0

是的,紅色的1行和2列,他們需要適合該部分 –

0

這是一個不填充的餘量,所以你需要設置元素或父/ s的padding: 0

編輯:

.tve_lp_content tve_editor_main_content tve_empty_dropzone tve_content_width, 
.tve_lp_template_wrapper:not(.tve_lp_blank).tve_post_lp .tve_lp_content .out, 
.tve_post_lp .out .in, 
.tve_post_lp .tve_lp_content { 
    padding: 0; 
    margin: 0; 
} 
+0

好吧,我試過了,但它仍然會離開你wif sm空間 –

+0

編輯更完整的答案,你應該能夠發現這些變化沒有我們的幫助,雖然 – Bogdan

+0

摧毀了頁面 –

2

試試這個:

body { 

margin : 0; 

} 
+0

dosent似乎工作,你試着在頁面上嘗試 –

+0

是的,工作,只是嘗試它。 – Ehsan

+0

我試了一下沒有工作 –

0

嘗試使用這個,!重要覆蓋任何已經設置填充

body { 

padding : 0 !important; 

} 
0

也許你應該開始嘗試使用引導程序? http://getbootstrap.com/

使用引導程序很容易進行列布局,並且使用container-fluid您可以獲得頁面的全角。

<div class="container-fluid"> 
    <div class="col-lg-12"> 
     <div class="col-lg-6"> 
      Column one 
     </div> 
     <div class="col-lg-6"> 
      Column two 
     </div> 
    </div> 
</div> 

第二種可能的解決方案,您的問題將是以下內容添加到你的CSS:

body { margin: 0; } 
+0

感謝兄弟,我在這一個已經dosent支持引導,除了我使用bootstrap –

+0

所以它不支持bootstrap,但你使用它?如果它不支持它。你爲什麼要嘗試使用它? – Deathstorm

+0

nt使用bootsrap,我剛剛使用了一個使用CSS的列的網格 –

0

由於DeathStorm建議你可以嘗試使用負利潤率,即使我同意這不是最好的解決辦法。

在當前的代碼庫,會給

.section.group { 
    margin-left: -42px; 
    margin-right: -42px; 
    display: flex; /* Only needed for equal width columns */ 
    } 

    .section.group > .col { 
    flex-grow: 1; /* Only needed for equal width columns */ 
    }