2017-06-19 50 views
0

我在我的WordPress网站上有一个MailChimp optin的代码,但由于某种原因,边框突然消失了,请问您可以看看我可能会丢失什么?使用div样式无法进行边框显示

<div style="border-style: solid thin #FFFFFF"> 
 
    <p style="float:left; padding: 0px 5px 0px 0px;"><img src="http://www.xxxx.com/wp-content/uploads/2017/06/photo.jpg" style="width:115px; height:auto;" class="border"></p> 
 
    <p><text 
 
    </p> 
 
    &nbsp; 
 

 
    <!-- Begin MailChimp Signup Form --> 
 
    <link href="//cdn-images.mailchimp.com/embedcode/horizontal-slim-10_7.css" rel="stylesheet" type="text/css"> 
 
    <style type="text/css"> 
 
    #mc_embed_signup{background:#FFFFFF; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;} 
 
    /* Add your own MailChimp form style overrides in your site stylesheet or in this style block. 
 
    We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */ 
 
    </style> 
 
    <div id="mc_embed_signup"> 
 
    <form action="//xxxxxxx.us14.list-manage.com/subscribe/post?u=2b24d9a7eb0e64eed113ca92c&amp;id=6444b29c17" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> 
 
     <div id="mc_embed_signup_scroll"> 
 
     <label for="mce-EMAIL">Subscribe to our mailing list</label> 
 
     <input type="email" value="" name="EMAIL" class="email" id="mce-EMAIL" placeholder="email address" required> 
 
     <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> 
 
     <div style="position: absolute; left: -5000px;" aria-hidden="true"><input type="text" name="b_2b24d9a7eb0e64eed113ca92c_6444b29c17" tabindex="-1" value=""></div> 
 
     <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div> 
 
     </div> 
 
    </form> 
 
    </div>

+0

你在上面的代码中的一些错误,不知道是不是你原来的代码有同样的错误,可能想看看那个 – myfunkyside

回答

0

用途:

<div style= 'border: 2px solid #fff'> 

您的DIV而不是

我希望:

#mc_embed_signup{background:#FFFFFF; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;} 

之间样式标签

<style>#mc_embed_signup{background:#FFFFFF; clear:left; font:14px Helvetica,Arial,sans-serif; width:100%;}</style> 

如果不是,它将不起作用。样式必须应用于css文件或标签之间。 此外,我想让你记住关于css层次结构(CSS Selector Hierarchy?