我是一个HTML/CSS的新手,正在尝试创建我的第一个网页。
我无法为类名为inner
的
设置背景颜色。目前这个
显示的是
有什么指导意见吗?可能是我做错了什么?
感谢帮助! :)
banner-bottom
类中设置的背景颜色。
以下是我的HTML代码:
.banner-bottom{
background:#F7F7F7;
padding:1em 1em;
text-align:center;
position: relative;
}
.floatleft {
float:left;
width: 25%;
height: 100%;
}
.floatright {
float:right;
width: 75%;
background-color: #EEE;
position: relative;
text-align: center;
}
.inner{
position: absolute;
height:100%;
text-align: center;
background-color: #1b1b1b;
width: 100%;
}
<div class="banner-bottom" width="100%" >
<div class="floatleft"><input type="button" class="pink_btn" value="Who?"/></div>
<div class="floatright"><div class="inner"> some values here</div></div>
<div style="clear:both;"></div>
</div>