我有这样的Aweber表单代码:

<!-- AWeber Web Form Generator 3.0 -->
<style type="text/css">
#af-form-560053752 .af-body .af-textWrap{width:98%;display:block;float:none;}
#af-form-560053752 .af-body input.text, #af-form-560053752 .af-body textarea{background-color:#FFFFFF;border-color:#919191;border-width:1px;border-style:solid;color:#000000;text-decoration:none;font-style:normal;font-weight:normal;font-size:12px;font-family:Verdana, sans-serif;}
#af-form-560053752 .af-body input.text:focus, #af-form-560053752 .af-body textarea:focus{background-color:#FFFAD6;border-color:#030303;border-width:1px;border-style:solid;}
#af-form-560053752 .af-body label.previewLabel{display:block;float:none;text-align:left;width:auto;color:#000000;text-decoration:none;font-style:normal;font-weight:normal;font-size:12px;font-family:Verdana, sans-serif;}
#af-form-560053752 .af-body{padding-bottom:15px;padding-top:15px;background-repeat:no-repeat;background-position:inherit;background-image:none;color:#000000;font-size:11px;font-family:Verdana, sans-serif;}
#af-form-560053752 .af-quirksMode{padding-right:15px;padding-left:15px;}
#af-form-560053752 .af-standards .af-element{padding-right:15px;padding-left:15px;}
#af-form-560053752 .buttonContainer input.submit{background-image:url("http://forms.aweber.com/images/auto/gradient/button/07c.png");background-position:top left;background-repeat:repeat-x;background-color:#0057ac;border:1px solid #0057ac;color:#FFFFFF;text-decoration:none;font-style:normal;font-weight:normal;font-size:14px;font-family:Verdana, sans-serif;}
#af-form-560053752 .buttonContainer input.submit{width:auto;}
#af-form-560053752 .buttonContainer{text-align:right;}
#af-form-560053752 button,#af-form-560053752 input,#af-form-560053752 submit,#af-form-560053752 textarea,#af-form-560053752 select,#af-form-560053752 label,#af-form-560053752 optgroup,#af-form-560053752 option{float:none;position:static;margin:0;}
#af-form-560053752 div{margin:0;}
#af-form-560053752 form,#af-form-560053752 textarea,.af-form-wrapper,.af-form-close-button,#af-form-560053752 img{float:none;color:inherit;position:static;background-color:none;border:none;margin:0;padding:0;}
#af-form-560053752 input,#af-form-560053752 button,#af-form-560053752 textarea,#af-form-560053752 select{font-size:100%;}
#af-form-560053752 select,#af-form-560053752 label,#af-form-560053752 optgroup,#af-form-560053752 option{padding:0;}
#af-form-560053752,#af-form-560053752 .quirksMode{width:300px;}
#af-form-560053752.af-quirksMode{overflow-x:hidden;}
#af-form-560053752{background-color:#F0F0F0;border-color:#CFCFCF;border-width:1px;border-style:solid;}
#af-form-560053752{display:none;}
#af-form-560053752{overflow:hidden;}
.af-body .af-textWrap{text-align:left;}
.af-body input.image{border:none!important;}
.af-body input.submit,.af-body input.image,.af-form .af-element input.button{float:none!important;}
.af-body input.text{width:100%;float:none;padding:2px!important;}
.af-body.af-standards input.submit{padding:4px 12px;}
.af-clear{clear:both;}
.af-element label{text-align:left;display:block;float:left;}
.af-element{padding:5px 0;}
.af-form-wrapper{text-indent:0;}
.af-form{text-align:left;margin:auto;}
.af-quirksMode .af-element{padding-left:0!important;padding-right:0!important;}
.lbl-right .af-element label{text-align:right;}
body {
}#af-form-fb-560053752 .af-body .af-textWrap{width:98%;display:block;float:none;}
#af-form-fb-560053752 .af-body input.text, #af-form-fb-560053752 .af-body textarea{background-color:#FFFFFF;border-color:#919191;border-width:1px;border-style:solid;color:#000000;text-decoration:none;font-style:normal;font-weight:normal;font-size:12px;font-family:Verdana, sans-serif;}
#af-form-fb-560053752 .af-body input.text:focus, #af-form-fb-560053752 .af-body textarea:focus{background-color:#FFFAD6;border-color:#030303;border-width:1px;border-style:solid;}
#af-form-fb-560053752 .af-body label.previewLabel{display:block;float:none;text-align:left;width:auto;color:#000000;text-decoration:none;font-style:normal;font-weight:normal;font-size:12px;font-family:Verdana, sans-serif;}
#af-form-fb-560053752 .af-body{padding-bottom:15px;padding-top:15px;background-repeat:no-repeat;background-position:inherit;background-image:none;color:#000000;font-size:11px;font-family:Verdana, sans-serif;}
#af-form-fb-560053752 .af-quirksMode{padding-right:15px;padding-left:15px;}
#af-form-fb-560053752 .af-standards .af-element{padding-right:15px;padding-left:15px;}
#af-form-fb-560053752 .buttonContainer input.submit{background-image:url("http://forms.aweber.com/images/auto/gradient/button/07c.png");background-position:top left;background-repeat:repeat-x;background-color:#0057ac;border:1px solid #0057ac;color:#FFFFFF;text-decoration:none;font-style:normal;font-weight:normal;font-size:14px;font-family:Verdana, sans-serif;}
#af-form-fb-560053752 .buttonContainer input.submit{width:auto;}
#af-form-fb-560053752 .buttonContainer{text-align:right;}
#af-form-fb-560053752 button,#af-form-fb-560053752 input,#af-form-fb-560053752 submit,#af-form-fb-560053752 textarea,#af-form-fb-560053752 select,#af-form-fb-560053752 label,#af-form-fb-560053752 optgroup,#af-form-fb-560053752 option{float:none;position:static;margin:0;}
#af-form-fb-560053752 div{margin:0;}
#af-form-fb-560053752 form,#af-form-fb-560053752 textarea,.af-form-fb-wrapper,.af-form-fb-close-button,#af-form-fb-560053752 img{float:none;color:inherit;position:static;background-color:none;border:none;margin:0;padding:0;}
#af-form-fb-560053752 input,#af-form-fb-560053752 button,#af-form-fb-560053752 textarea,#af-form-fb-560053752 select{font-size:100%;}
#af-form-fb-560053752 select,#af-form-fb-560053752 label,#af-form-fb-560053752 optgroup,#af-form-fb-560053752 option{padding:0;}
#af-form-fb-560053752,#af-form-fb-560053752 .quirksMode{width:300px;}
#af-form-fb-560053752.af-quirksMode{overflow-x:hidden;}
#af-form-fb-560053752{background-color:#F0F0F0;border-color:#CFCFCF;border-width:1px;border-style:solid;}
#af-form-fb-560053752{display:none;}
#af-form-fb-560053752{overflow:hidden;}
.af-body .af-textWrap{text-align:left;}
.af-body input.image{border:none!important;}
.af-body input.submit,.af-body input.image,.af-form .af-element input.button{float:none!important;}
.af-body input.text{width:100%;float:none;padding:2px!important;}
.af-body.af-standards input.submit{padding:4px 12px;}
.af-clear{clear:both;}
.af-element label{text-align:left;display:block;float:left;}
.af-element{padding:5px 0;}
.af-form-fb-wrapper{text-indent:0;}
.af-form{text-align:left;margin:auto;}
.af-quirksMode .af-element{padding-left:0!important;padding-right:0!important;}
.lbl-right .af-element label{text-align:right;}
body {
}
</style>
<iframe name="af-iframe" id="af-iframe-560053752" src="http://forms.aweber.com/form/52/560053752.htm" style="margin: -10px !important; width: 318px !important;" width="300px" height="333px" allow-transparency="true" scrolling="no" frameBorder="0"></iframe><script type='text/javascript'></script><script type="text/javascript">
    <!--
    (function() {
        var IE = /*@cc_on!@*/false;
        if (!IE) { return; }
        if (document.compatMode && document.compatMode == 'BackCompat') {
            if (document.getElementById("af-form-560053752")) {
                document.getElementById("af-form-560053752").className = 'af-form af-quirksMode';
            }
            if (document.getElementById("af-body-560053752")) {
                document.getElementById("af-body-560053752").className = "af-body inline af-quirksMode";
            }
            if (document.getElementById("af-header-560053752")) {
                document.getElementById("af-header-560053752").className = "af-header af-quirksMode";
            }
            if (document.getElementById("af-footer-560053752")) {
                document.getElementById("af-footer-560053752").className = "af-footer af-quirksMode";
            }
        }
    })();
    -->
</script>


我把它放在我的WordPress页面上,然后在style.css中添加:

#af-form-560053752 .af-element {float: center;}


但是表格不是居中而是停留在左边。
该网站是:www.zupertop.com

我已经尝试了两个小时,一直在寻找解决方案,但没有发现任何运气。
我的工作有问题吗?

谢谢你:)

最佳答案

只是改变这个

<iframe name="af-iframe" id="af-iframe-560053752" src="http://forms.aweber.com/form/52/560053752.htm" style="margin: -10px !important; width: 318px !important;" width="300px" height="333px" allow-transparency="true" scrolling="no" frameBorder="0"></iframe><script type='text/javascript'></script><script type="text/javascript">


通过

<iframe name="af-iframe" id="af-iframe-560053752" src="http://forms.aweber.com/form/52/560053752.htm" style="margin: -10px !important; width: 100% !important;" width="300px" height="333px" allow-transparency="true" scrolling="no" frameBorder="0"></iframe><script type='text/javascript'></script><script type="text/javascript">

关于html - 在Wordpress中对齐Center Aweber表单,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13043098/

10-10 00:34