css - 输入[类型 ="image"] 不会让步

标签 css input

我试图让按钮向下移动,边距、填充、顶部与其他输入和标签处于同一水平,但它不会移动。

html代码:见图片enter image description here

   input[type="image"] .button-update-cart{
top:100px;
}

例如,在表格上,图像不在该位置:参见此图像 enter image description here

编辑

.page-cart .cart-totals .promo-code .field .button-update-cart{
position:relative;
}

.page-cart .cart-totals .promo-code .field input[type="image"]
{
top:100px;

}

它不起作用:(

任何见解将不胜感激!

最佳答案

您需要给元素 position: relative 才能使 top 生效。

关于css - 输入[类型 ="image"] 不会让步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5945548/

相关文章:

c# - 使用文本框更改控件

php - 动态添加/删除新的表单输入

input - 如何删除批处理文件中用户提供的输入的尾随和前导空格?

javascript - Canvas 仅显示在 slider 的第一个图像上或连接到每个图像的底部

css - Mac 上的 Firefox userChrome 边框颜色不正确

javascript - 带有主题选项的纯 HTML 网站

python - 我正在尝试在 python 2.7 中输入并允许它区分字符串和整数

javascript 访问 opera 和 ie 的 css 转换

css - Rspec + capybara : check existence of tag with it's css class

c# - 当前上下文中不存在名称 'txtBxSearch'