Skillfully using CSS to control the height of Div Adaptive Browser

Source: Internet
Author: User

Some friends when using Css+div to do a station, often encounter such a problem, a frame in different browsers will be distorted or position disorder, this how to do? In fact, the method is very simple, with the following code can be resolved:

   <style>
  #myTable {height:100%;border:solid 1px red; width:100%;}
  #top {margin-top:1px;height:100px;border:solid 1px green}
  #down {margin-top:1px;height:89%; Border:solid 1px silver}
  #left {height:100%;border:solid 1px black;margin:1px;width:200px;float:left;}
  #right {border:solid 1px #0aa; margin:1px;height:100%;width:240px;overflow:scroll
 }
  </style>
   <body>
 <table id= ' myTable '
 <tr ><td>
 <div id= ' top ' ></div>
 <div id= ' down '
 <div id= ' Left ' ></div>
 <div id= ' right '
  here is content
  Here is content here is content
  here is content
  Here is content
  Here is content
  Here is content
  Here is content
  Here is content
 
  here is content
  Here is content
  Here is content
 
  Here is content
  Here is content
  here isContent
  Here is the dual-line space is content
  Here is the content
 
  Here is content
  Here is content
  Here is content
 
& nbsp; Here is the content
  Here is content here is content
 
  Here is content
 
  Here is content
  Here is content here is content
  Here is the content
 
  Here is content
  Here is content
  Here is content
  Here is content
  Here is content let's content
  Here is the content
  Here is content here is content
  Here is content
 
  Here is content
  Here is content
  Here is content
  Here is the content
  Here is content here is content
 </div>
 </div>
 </td>
 </tr ></table>
 </body>
 

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.