Monday, February 21, 2011

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

I have an 'iframe' 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.

From stackoverflow
  • 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/

    Lee : Thanks Andrew, this is just what I need.

0 comments:

Post a Comment