CSS设置宽度填充剩余面积的百分比 [英] CSS set width to fill % of remaining area

查看:640
本文介绍了CSS设置宽度填充剩余面积的百分比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于微微的垃圾标题很抱歉。我不能想象如何描述这个更好。

Sorry for the slightly rubbish title. I could not think how to describe this one better.

我试图在我的网站上实现Google朋友群成员小工具(刚刚进入方案,想要至少为了测试)。

I am trying to implement the Google Friend Connect members gadget on my site, (just got into the scheme and want to put it in without a major redesign, at least for testing sake).

我的问题如下:

我有一个容器div,其宽度为主页(body)的90%。在这里,我漂浮一个div到右侧,并将其宽度为300px,并将谷歌小工具放在里面。我想要的是能够有一个div填充95%的剩余空间在google小工具div的左边。

I have a container div that has a width of 90% of the main page (body). Inside this I am floating a div to the right and setting its width to 300px and putting the google gadget inside it. What I would like is to be able to have a div fill 95% of the space remaining to the left of the google gadget div.

我不知道是否可以混合px和%与div和width。

I don't know if it is possible to be able to mix px and % with divs and widths.

我希望这有意义。

谢谢

推荐答案

这是。你正在寻找半流体布局。任务最初是 CSS实现的圣杯,但是正如你可以看到的这个链接(他们做3列,2固定,但很容易改变),这是一个问题长解决=)

It is. You're looking for a semi-fluid layout. The quest was was originally the holy grail of CSS implementation... But as you can see from that link (they're doing 3 columns, 2 fixed but it's easy to alter), it's a problem long solved =)

这篇关于CSS设置宽度填充剩余面积的百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆