2013-07-13 109 views
-1

提前致謝!我試圖浮動,邊距和填充什麼沒有任何幫助,我想是剛剛貼的問題如何刪除此空間?

http://www.mediafire.com/?6ngtuh4k5nf43r2

+0

我該如何刪除這個時間? 請更具體地描述問題。請同時發佈您遇到問題的代碼,而不僅僅是一個鏈接。 – mishik

+0

當你剛纔說沒有任何工作,沒有任何代碼時,人們可以如何幫助你? – Kousha

+0

代碼鏈接... –

回答

2

即空間(可能)的背景...截屏的右上角身體的,而不是元素的。

body { 
margin: 0; 
padding: 0; 
} 

很難說,因爲我看不到代碼的<body>標籤內的截圖,但幾乎可以肯定這是個問題。

0

這些添加到你的CSS:

body, html { 
    margin: 0; 
    padding: 0; 
} 
.element { 
    position: absolute; 
    top: 0; 
    left:0; 
} 
+0

感謝地獄的傢伙!有效 ! :) –

0

也可以考慮使用css reset它與瀏覽器不會出現不一致的幫助。

0

您可以使用CSS重置工具重置所有瀏覽器默認樣式,例如在默認css文件的頂部添加以下規則。

html{color:#000;background:#FFF}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td,select{margin:0;padding:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}/*address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal}*/ol,ul{list-style:none}caption,th{text-align:left}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}q:before,q:after{content:''}abbr,acronym{border:0;font-variant:normal}sup{vertical-align:text-top}sub{vertical-align:text-bottom}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit}input,textarea,select{*font-size:100%}legend{color:#000} 
0

每當我在我的CSS文件

*{ 
    margin:0; 
    padding:0; 

    /* Optional Below */ 
    box-sizing: border-box; 
    -webkit-box-sizing: border-box; 
    -moz-box-sizing: border-box; 
} 

此啓動一個新項目,我總是有這樣的重置上的一切(不:盒大小)的空白和邊距。