html - Trying to apply padding and border to my CSS style
问题描述
I've been trying to style a div and put border and padding to see better the structure, but do not work. Below the code:
#div1ad {width: 96%; height:40px; max-width: 1140px; min-width: 200px; margin-bottom: 5px; padding: 0 0 0 45px; border: 1px dashed red;}
#div1ad div {display: inline-block; margin: 2px 10px 0 1px; font-family: Arial; border: 1px dashed black;}
#div1ad>form>input{float: right; margin-right: 5px; width:15em; height:2.5em; color: #3c4043; font-family: Verdana; font-size: 12px; background-color: #f8f9fa; border-radius: 5px 5px; border: 0}
#div1ad>form>input[type=submit]:hover {border: 1px solid #DCDCDC; box-shadow: 0px 2px 2px silver;}
#div1ad>form>input[type=submit]:focus {outline: none;}
#div1ad>form>input[type=submit]:active {border: 1px solid #349bff;}
<div id="div1ad">
<form action="index.html">
<input type="submit" value="Search">
</form>
</div>
解决方案
#div1ad {width: 96%; height:40px; max-width: 1140px; min-width: 200px;
margin-bottom: 5px; margin:2%; border: 1px dashed red;}
#div1ad div {display: inline-block; margin: 2px 10px 0 1px; font-
family: Arial; border: 1px dashed black;}
#div1ad>form>input{float: right; margin-right: 5px; width:15em;
height:2.5em; color: #3c4043; font-family: Verdana; font-size: 12px;
background-color: #f8f9fa; border-radius: 5px 5px; border: 0}
#div1ad>form>input[type=submit]:hover {border: 1px solid #DCDCDC; box-
shadow: 0px 2px 2px silver;}
#div1ad>form>input[type=submit]:focus {outline: none;}
#div1ad>form>input[type=submit]:active {border: 1px solid #349bff;}
推荐阅读
- reactjs - 使用 moment.js 更改表单中的日期
- r - 编程 R ifelse 条件循环
- qt - 如何使用另一个文本的字体设置文本字体
- python - Treetaggerwrapper python中的参数文件无效
- npm - 如何递归 npm 安装所有依赖项
- php - 无法在 WordPress 上编辑 functions.php 文件
- mongodb - 将 MongoDB 迁移到 PostgreSQL 的工具
- download - “下载构建工件”实际上是做什么的?
- docker - 配置、扩展 Grafana Docker 容器
- php - laravel 5.7.15 419 抱歉,您的会话已过期。请刷新并重试