[英]how to set width of a div in percentage minus certain pixels using javascript or css
following code represents two divs on my webpage. 以下代码代表了我网页上的两个div。
<div class="left">Left</div>
<div class="right" id="toset">
<div class="right-top">right-top</div>
<div class="right-bottom">right-bottom</div>
</div>
i have two divs, left is of fixed width and position, the right one has to be of the remaining width and of absolute position . 我有两个div,左边的宽度和位置固定,右边的宽度和位置绝对固定。
i cannot figure out how to set the width of right one to fill the remaining screen. 我不知道如何设置右一个的宽度来填充剩余的屏幕。
check following link for the full code. 检查以下链接以获取完整代码。
If I've understood your question correctly, 如果我正确理解了您的问题,
.right{
:
right: 0px;
}
should do the trick. 应该可以。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.