开发者

CSS: Div Positioning... help

take a look at this Code. i want the Left & Right Box (DIVs) to appear in one开发者_如何转开发 line.. how to do it


<div><div style="float:left">a</div> <div style="float:left">b</div></div>
<div style="clear:both"></div>


Float both the left and right divs to the left and clear the footer. You will also need to adjust the widths of the left and right divs for them to fit on the same line.

#left
{
    position:static;
    width: 40%;
    height: 50px;
    margin-top: 10px;
    margin-right: 10px;
    background: #111111;
    border: solid 3px #ff0000; 
    float: left;
}

#right
{
    position:static;
    width: 40%;
    height: 50px;
    margin-top: 10px;
    margin-right: 10px;
    background: #111111;
    border: solid 3px #ff0000;
    float: left;
}

#footer
{
    position: static;
    width   : 100%;
    height  : 50px;
    margin-top: 10px;

    background: #111111;
    border: solid 3px #ff0000;
    text-align: center;
    clear: both;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜