2013-08-19 17 views
1

我這個頁面上的工作:無法獲得CSS定位的圖像的工作

http://g33ktalk.com/etsy-a-deep-dive-into-monitoring-with-skyline/

,你怎麼看向底部,圖像認購不具有填充和接觸div的。

我試圖做這樣的事情:

#gform_submit_button_8 
{ 
    padding-left: 15px; 
} 

但是沒有效果。我也嘗試添加填充類gform_footer,但它也沒有效果。有誰知道如何添加填充到該圖像的左側?

編輯:

這是較大的HTML中,這一形象是

<div class='gf_browser_chrome gform_wrapper' id='gform_wrapper_8' > 
    <form method='post' enctype='multipart/form-data' id='gform_8' action='/etsy-a-deep-dive-into-monitoring-with-skyline/'> 
    <div class='gform_heading'> 
     <h3 class='gform_title'>Subscribe to our YouTube Channel</h3> 
     <span class='gform_description'>Want to get more tech talks? Subscribe to our YouTube channels and get notified when new talks are posted.</span> 
    </div> 
    <div class='gform_body'> 
     <ul id='gform_fields_8' class='gform_fields top_label description_below'> 
     </ul> 
    </div> 
    <div class='gform_footer top_label'> 
     <input type='image' src='http://g33ktalk.com/wp-content/uploads/2012/10/subscribe.gif' id='gform_submit_button_8' class='gform_image_button' alt='Submit' tabindex='1' /> 
... 

謝謝!

+1

你嘗試過'保證金left'? – aldanux

+0

@ dqf13g32g還沒有。但我應該:)現在嘗試... – Genadinik

回答

2

從你的CSS:(更新這裏的填充值)

.gform_wrapper .gform_footer { 
    padding: 16px 0 10px 15px; 
    margin: 16px 0 0 0; 
    clear: both 
} 
+0

我知道你說過你想添加填充gform_footer,它沒有效果,但這對我有效。所以我不確定你最初的做法是否有所不同。 – andi

+0

剛剛嘗試過,它仍然不會添加div邊框和按鈕之間的空白:( – Genadinik

+0

我添加了更多的HTML到我原來的問題,以提供一些上下文 – Genadinik

1

Usualy當我面對這樣的問題,我檢查了我的整個的CSS。 嘗試使用bootstarp,因爲它有div,它會將你的內容轉移到頁面上的特定位置。有時候我們不能說我們在CSS中做了什麼錯誤,所以我通常會做的就是試着用Firebug(firefox)或chrome(DEV工具)來測試它。或用http://cssdesk.com/來測試我的網頁。

1

關鍵是要使選擇器具有足夠的特性,以覆蓋任何後續可能遵循的CSS規則。

我不會用!important,相反,我會嘗試這樣的:

div.gform_wrapper .gform_footer { 
    padding: 16px 0 10px 0; 
    margin: 16px 0 0 0; 
    clear: both 
}