1

我正在处理这个页面:

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' />
...

谢谢!

4

3 回答 3

2

来自您的 CSS:(在此处更新填充值)

.gform_wrapper .gform_footer {
    padding: 16px 0 10px 15px;
    margin: 16px 0 0 0;
    clear: both
}
于 2013-08-19T19:31:34.417 回答
1

通常当我遇到这种问题时,我会检查我的整个 CSS。尝试使用 bootstarp,因为它有 div,这会将您的内容转移到页面上的特定位置。有时我们不能说我们在 CSS 上做错了什么,所以我通常会尝试使用 Firebug(firefox)或 chrome(DEV 工具)对其进行测试。或使用http://cssdesk.com/来测试我的页面。

于 2013-08-19T19:52:24.267 回答
1

关键是使选择器足够具体,以覆盖可能遵循的任何后续 CSS 规则。

我不会使用!important,相反,我会尝试类似:

div.gform_wrapper .gform_footer {
    padding: 16px 0 10px 0;
    margin: 16px 0 0 0;
    clear: both
}
于 2013-08-19T19:56:32.723 回答