Xhtml+div layout: Three Div, both sides div width fixed, middle div width Adaptive

Source: Internet
Author: User

XHTML+DIV Regular Exam questions: Three Div, both sides div width fixed, the middle div width adaptive.

Share an implementation with you:

1.html Code

1 <Divclass= "Dyleft">Left column fixed width is 200px</Div>2 <Divclass= "Dyright">Fixed width of 200px in right column</Div>3 <Divclass= "Dycenter">Middle self-adapting width</Div>

2.CSS Code

1 Body{2 font-size:12px;3 margin:0;4}5 . Dyleft{6 float: Left;7 width:200px;8}9 . Dyright{Ten float: Right; One width:200px; A} - . Dycenter{ - margin:0 210px; the} - Div{ - Border:dotted 1px Green -}

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.