开发者

HTML-Two elements next to each, one absolute width and the other relative

开发者 https://www.devze.com 2023-01-06 03:07 出处:网络
I have an \'iframe开发者_StackOverflow\' next to a \'form\'. The form needs to have absolute width (width:450px), and the width of iframe will be relative as it will be whatever is left from the form.

I have an 'iframe开发者_StackOverflow' next to a 'form'. The form needs to have absolute width (width:450px), and the width of iframe will be relative as it will be whatever is left from the form. So for the iframe I will need something equivalent to 'width: 100% - 450px'. How can I achieve that?

Thanks in advance.


You can use jQuery to "query" for the current page and element dimensions, so some math and update the sizes accordingly.

http://api.jquery.com/width/

0

精彩评论

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