html中为什么div报错,css,html_div里面嵌套了ul,为什么div的高度小于ul高度,css,html - phpStudy...

div里面嵌套了ul,为什么div的高度小于ul高度

div高度见阴影部分

ul高度见阴影部分

实现的html代码如下:

css代码如下:

.navBar {

clear: both;

width: 100%;

border: solid;

/*border-top: solid;*/

border-bottom: solid;

border-width: 1px;

border-color: #dddddd;

margin:0px;

height: 1.5em;

}

.navBar ul {

width: 100%;

height: inherit;

background-color: white;

margin-top: 8px;

text-align: center;

padding-left: 10px;

padding-bottom: 0px;

margin-bottom: 0px;

}

.navBar ul li{

float: left;

display: inline-block;

vertical-align: middle;

list-style: none;

padding-right: 20px;

margin-bottom: 0px;

padding-bottom: 0px;

height: inherit;

}

.navBar ul li div{

clear: both;

font-size: 14px;

color: #929292;

height: inherit;

margin-left: 0px;

padding-left: 20px;

padding-right: 20px;

margin-bottom: 0px;

padding-bottom: 0px;

/*padding-bottom: 0.6em;*/

/*border-bottom: solid;*/

/*border-color: #00B7FF;*/

/*border-width: 2px;*/

}

相关阅读:

Cannot read property 'simpleforcast' of undefined ? 这究竟是什么错??

codeigniter默认路由器不匹配?

一道路由器的路由表填写习题,答案看不懂

有没有key和value互相之间一一映射的哈希表?

求大神来看看我的bug什么原因

七牛简单上传就抛出的异常

用nodejs 显示一个html页面 但是在浏览器控制台里报错

webpack打包iconfont.css失败

从Github 使用ssh clone 项目时出现问题

fis2 roadmap 添加默认依赖遇到bug

安卓移动web叫出键盘后,css样式失效

python urllib2 如何优化下载速度?

有没有比较好的开源Timeline js 库啊?

.php和.phtml是否一样

ionic滚动条在Android和iOS上不一样??!

长按移动端页面图片会出现收藏或保存图片提醒,怎样取消

一个域名中, 跨子域名 ajax 请求, 在 response 中 set_cookie, 但是无法设置.

为什么绝对定位下top left right bottom 都设置0,再margin: auto 就可以将元素垂直水平居中?

python判断变量类型时,为什么不推荐使用type()方法

ionic框架中 angular 去掉url中的#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值