Forum Moderators: not2easy

Message Too Old, No Replies

Setting Width: 100% - X

Can this be done in CSS?

         

ntbgl

12:34 pm on Jul 7, 2008 (gmt 0)

10+ Year Member



I have two elements, an object and a div.

I would like these two objects to be side by side, and to be 100% high.

I got that with the following code.

Now, what I would like to do is to make the div on the right be 200px, and the object on the left to fill up the rest of the space. Basically 100%-200px.

How can I do this?

<script type="text/css"
html{width:100%;height:100%}
body{margin:0;padding:0;width:100%;height:100%}
object{height:100%;width:100%;background:#99FF00;float:left}
#r{width:200px;height:100%;background:#00FF00;margin:0;padding:0;float:left}
</script>

<object type="text/html" data="..." border="none"></object>
<div id="r">...</div>

penders

2:48 pm on Jul 7, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can you float the 200px div right and then let the object fill the remaining space on the left?