帮助div - make div适合剩余的宽度 [英] Help with div - make div fit the remaining width
本文介绍了帮助div - make div适合剩余的宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下html代码:
I have the following html code:
<div class="a">
<div class="b">
<a href="#">text</a>
</div>
<div class="c">
text
</div>
</div>
div.a
{
margin-top: 10px;
clear: left;
float: left;
width: 100%;
text-align: center;
}
div.b
{
padding: 27px 10px 7px 10px;
background-color: #fff;
overflow: hidden;
float: left;
}
div.c
{
float: left;
}
我应该为div.c设置什么样式, .b和适合剩余的宽度?
What styles should I set for div.c to make it be beside the div.b and fit the remaining width?
这是一个适合屏幕100%的临时文件。
It's for a tempalte that will fit 100% of the screen.
谢谢!
推荐答案
<div class="a">
<div class="b">
<a href="#">click here to be amazed!</a>
</div>
<div class="c">
this is some awesome text
</div>
</div>
<STYLE>
div.a {
border: 1px solid red;
}
div.b {
float: left;
border: 1px solid blue;
}
div.c {
border: 1px solid green;
}
</STYLE>
这篇关于帮助div - make div适合剩余的宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文