2011-05-12 48 views
1

我在我的网站上使用bitrepository的Ajax PHP表单,并使用它们的CSS样式表对它进行样式设置。请前往http://diginnovations.com/dig-v4查看网站。Textarea框在Firefox 3.6中无法正确显示

除了Firefox 3.6以外,所有浏览器(甚至IE8)中的所有内容都能正确显示。 “评论”一词在textarea之外显示,这也是错误的地方。我用“位置:相对;”为了移动textarea并提交按钮。

这里是PHP代码:

$acf_form_fields = array('sender_name' => array('name'  => 'Name', 
              'mandatory' => 1, 
              'validation' => array('basic' => 1), 
              'type'  => 'input', 


              'errors'  => array('none' => 'Fill your name')), 


       'sender_email' => array('name'  => 'Email', 
              'mandatory' => 1, 
              'validation' => array('basic' => 1, 'email' => 1), 
              'type'  => 'input', 


              'errors'  => array('none' => 'Fill an e-mail address', 
                   'invalid' => 'Fill a valid e-mail address')), 

       'sender_telephone' => array('name' => 'Phone Number', 
              'mandatory' => 0, 
              'type'  => 'input'), 


           'sender_message' => array('name'  => '<div class="textbox">Comment</div>', 
              'mandatory' => 1, 
              'validation' => array('basic' => 1, 'min_chars' => 15), 
              'type'  => 'textarea', 
              'attributes' => array('rows' => 5, 
                   'cols' => 35), 

              'errors'  => array('none'  => '<div class="textboxerror">Fill your message</div>', 
                   'min_chars' => 'Your message should have at least [min_chars] characters.'))); 

这里是CSS:

/* Label, Input, Textarea */ 

#ajax_contact_form div.wrap { position: relative; margin: 0;} 
#acf_fields div.wrap label.in_field { position: absolute; top: 0; left: 0; width: 160px; display: block; margin: 11px 5px 5px 6px; padding: 0; color: #777; } 
#ajax_contact_form div br {display: none;} 

#acf_fields div { padding: 1px 0 1px 0px; } 

#acf_fields div input { display: inline; font-size: 17px; } 
#acf_fields div textarea { position: relative; left: 300px; bottom: 150px; font-size: 17px; display: inline; } 

#acf_fields p.acf_escts { padding: 5px 0; } 
#acf_fields label.acf_escts { width: 199px; padding-left: 0px; margin: 2px 17px 5px 0px; text-align: right; float: none; } 

/* Input, Textarea, Select */ 
#acf_fields input, textarea, select { -moz-box-shadow: 0 0 3px #eeeeee; background:-moz-linear-gradient(top, #ffffff, #eeeeee 1px, #ffffff 5px); margin: 5px 5px 5px 0; padding: 2px; height: 30px; width: 269px; } 
#acf_fields input, select { float: none; border: 2px solid #999; color: #333; -moz-border-radius: 3px; } 
#acf_fields textarea { position: relative; left: 300px; bottom: 150px; width: 269px; height: 130px; border: 2px solid #999; color: #333; -moz-border-radius: 3px; } 

.textbox { position: relative; left: 300px; bottom: 150px; display: inline; z-index: 150; } 

.textboxerror { position: relative; left: 300px; bottom: 150px; display: inline; z-index: 150; } 

显然,如果我将它们移动到FF 3.6正确显示,它搅乱了所有的定位其他浏览器。

有什么建议吗?提前致谢。

回答

0

你有几个结构问题。

1)你不应该把divlabel内 - label是内联,div是块,使用span什么 - 使用HTML验证,你有几个验证错误。

2)而不是移动textarea.textbox独立,为何不动的div.wrap

+0

谢谢你的提示!该div是问题。 – 2011-05-12 19:27:58

相关问题