您的位置:首页 > Web前端 > CSS

html css 怎么使img和a标签在一个行内元素中间对齐

2017-10-18 15:27 686 查看

html css 怎么使img和a标签在一个行内元素中间对齐

答案是:#box ul.games li img{vertical-align: middle;} 这行很重要哦。

?
  

.top_bj{ width:100%; height:36px; overflow:hidden; background:url(../images/top_bj.gif);}
.top_content{ width:100%; margin:0px auto; height:36px; overflow:hidden;}
.top_logo{ width:170px; float:left;}
.all_icon{float:left; padding:7px; width:16px; height:16px; overflow:hidden;}
.all_black,.all_black a:link,.all_black a:visited{font-size: 12px; line-height:30px; font-weight: normal; color: #595959; text-decoration: none; font-family:Arial, Helvetica, sans-serif;}
.all_black a:hover{font-size: 12px; line-height:30px; font-weight: normal; color: #0e6cb0; text-decoration: none; font-family:Arial, Helvetica, sans-serif;}
.black,.black a:link,.black a:visited{font-size:12px;line-height: 36px;font-weight: normal;color: #464646;text-decoration: none; font-family:Arial, Helvetica, sans-serif;}
.black a:hover{font-size:12px;line-height: 36px;font-weight: normal;color: #03C;text-decoration: none; font-family:Arial, Helvetica, sans-serif;}

.red,.red a:link,.red a:visited{font-size:12px;line-height: 36px;font-weight: normal;color: #F00;text-decoration: none; font-family:Arial, Helvetica, sans-serif;}
.red a:hover{font-size:12px;line-height: 36px;font-weight: normal;color: #03C;text-decoration: none; font-family:Arial, Helvetica, sans-serif;}

#box{display:none;width:593px; float:right; overflow:hidden; margin:0px auto; padding-right:100px;}
#box .div01{width:593px; overflow: hidden; position:absolute; z-index:999; top:30px;}
#box .div01 .border{width:100%; overflow:hidden;}
#box ul.content01{width:591px; background:#FFF; overflow: hidden; border:solid 1px #9c9c9c; border-bottom:none;border-top:none;list-style:none;}
#box ul.gtype{float: left; width: 80px;}
#box ul.games{float: left; width: 509px;}
#box ul.games li{float: left; width: 100px;}
#box ul.games li img{vertical-align: middle;}
#box ul.games li a{padding-left: 5px;}


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐