Layer Automatic Adaptation Height _ Experience Exchange

Source: Internet
Author: User
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "><pead><title></title><style type=" Text/css "> Body {font:12px tahoma;margin:0px;text-align:center;} a:link,a:visited {font-size:12px; Text-decoration:none;} a:hover{}/* Page layer Container */#container {width:780px;margin:0px auto;background: #fff}/* Page header */#header {Background:url ( logo.gif) No-repeat;} #banner {background:url (banner.jpg) 0px no-repeat;/* Add background image */;background: #999; width:780px; /* Set the width of the layer */margin:auto; /* Layer Center */height:200px; /* Set Height */border-bottom:5px solid #EFEFEF; /* Draw a light gray solid line */clear:both/* Clear floating */} #pagebody {width:780px;/* Set width */margin:0px auto;/* Center */Background: #0 XX} #sidebar {width:200px;/* Set width */text-align:left;/* Text left align */float:left;/* Float Left */background: #f3c; colo R: #666 Overflow:hidden; /* out of width partially hidden */height:300px; padding:0px} #mainbody {width:580px; Text-align:left; margin:0px Auto; /* Center */float:right; Overflow:hidden; Color: #fff}/* Bottom of page */#footer {width:780px;margin:0 auto;height:65px;background: #999; Repeat-x;color: #ff0066; clear: Both } </style></pead><body> <p> This layer needs to be synchronized with the layer on the right, and also requires an adaptive height </p> <p> want to make this layer automatically adapt to the height, is there a way? </p> This layer does not change </body></ptml>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
  • Related Article

    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.