我正在我的这个网站上工作。我注意到 greysofa.html 页面的搜索栏比我网站上的其他页面短。但是,我无法弄清楚为什么会发生这种情况,因为大多数代码在网站的其余部分都是相同的。有人可以指出我需要修改哪些部分吗?谢谢!
https://helloyellowmellowcello.github.io/WareHouse/greysofa.html
最佳答案
你已经在 greysofa.html
文件中导入了 cart.css
,它有这个类:
input {
width: 3rem;
padding-left: 1rem;
margin-left: 1rem;
}
这会影响页面中呈现的所有输入,包括您的搜索栏,即:
<input type="text" name="search" placeholder="Search for items">
margin-left: 1rem
使搜索栏缩短 1rem。
关于html - 搜索栏比网站的其余部分短?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50341653/