我编写了我的网站的所有浏览器,但当然IE浏览器有问题。特别是只有IE 7.我希望找到一个解决方案,为什么它的行为方式是两个问题,我可以添加,所以IE会正确显示它。为什么在我的div中会发生额外的填充?
我的提交按钮正在对齐其包含div的底部。
CSS提交按钮为搜索字段
#searchform { /*container widget */ position: relative; left: 15px; width: 97%; height: 30px; background-color: #f3f3f3; border: 2px solid #742222;}
#searchform label { display: none; }
#searchform input#s { width: 75%; height: 20px;}
input[type=text],input#s { margin: 0 10px 0 0; width: 60%; }
#searchsubmit{ position: relative; float: right; width: 30px; height: 30px; text-indent: -999px; background: url(http://averylawoffice.ca/img/SEARCH-submit.jpg) center; border: 0px;}
这个CSS在所有的浏览器,但IE浏览器版本7的作品有没有一种方法,使其顶部对齐,而不必绝对定位?
你不能发布该网址到该页面吗?使用浏览器的开发工具可以最好地研究这些问题。 –
@ŠimeVidas:几乎可以肯定http://www.averylawoffice.ca/averywordpress/。我记得该网址已发布在前一个问题中。 – thirtydot
如果将位置相对规则添加到包含该输入元素的div,请删除输入元素上的浮动右值规则,并向输入元素添加绝对位置,顶部0px和右侧0px位置。 – j08691