Use jquery for background page layout control div implementation left-right

Source: Internet
Author: User

The background of a Web site using frame framework to implement this form, this side of the author is not using the frame but the pure div layout, below to see the specific implementation code

A site's background management is a part of the maintenance of fixed position, editable part of the changes with the browser changes, so sometimes use the frame framework to implement this form, the author is not using the frame but the pure div layout, want to achieve this way how to do it? The following control div implementation of the left-right, fixed to the left, the right-hand side with the browser changes and changes in the jquery implementation code.

The code is as follows: <script type= "Text/javascript" >//Resize the left and right layout based on browser size $ (window). Ready (function () {var wheight=$ (window).  Height ();  var wwidth=$ (window). width ();  $ (". Div_admin_left"). CSS ("height", (wheight-40));  $ (". Div_admin_right"). CSS ("height", (wheight-40));  $ (". Div_admin_right"). CSS ("width", (wwidth-285) + ' px ');  });  $ (window). Resize (function () {var wheight=$ (window). Height ();  var wwidth=$ (window). width ();  $ (". Div_admin_left"). CSS ("height", (wheight-40));  $ (". Div_admin_right"). CSS ("height", (wheight-40));  $ (". Div_admin_right"). CSS ("width", (wwidth-285) + ' px ');  }); </script> here the author made the left fixed, the right with the browser changes in the way, but also implemented with the browser to become larger and larger, shrinking also relative should be proportional to shrink the code, for reference only.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.