html-v12.25+ Classroom Exercises-layout left fixed right adaptive

Source: Internet
Author: User

One problem is that when the screen is narrowed down to a certain width, the border bar will be squeezed out

1 Body{2 font-family:' Amarante ', cursive;3 background:URL (http://www.w3cplus.com/sites/default/files/bg_body.png) repeat;5}6 7 . Wrapper{8 margin:0 Auto;9} One . Header-wrapper{ A Background-color:#BD9C8C; -} the . Header{ - width:80%; - Background-color:#BD9C8C; - margin:0 Auto; + Margin-bottom:5px; - text-align:Center; + A} at - - . Main-content-wrapper{ - width:80%; - margin:0 Auto; -} in . Main-content{ - float: Left; to Border-left:255px Solid Pink; + Margin-bottom:15px; - Box-shadow:0 1px 2px 1px rgba (0, 0, 0, 0.2); the} - . Sidebar{ the width:250px; + float: Left; A Margin-bottom:5px; the Background-color:Yellow; + Margin-left:-80%; - Margin-bottom:15px; $} $ Wuyi . Footer-wrapper{ the Clear:both; - Background-color:#BD9C8C; Wu} - . Footer{ About Clear:both; $ width:80%; - margin:0 Auto; - Margin-bottom:5px; - text-align:Center; A +}

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharest= "Utf-8" />    <!--spaces and slashes are optional -     <title>Test</title>  <Linkrel= "stylesheet"type= "Text/css"href= "Css/test1.css"></Head>    <Body>        <Headerclass= "Header-wrapper">            <Divclass= "header">                <H1>Header Content</H1>            </Div>        </Header>           <Mainclass= "Container">           <Divclass= "Main-content-wrapper">            < Sectionclass= "Main-content">                <H2>defines pre-formatted text, and the text that is enclosed in the pre element usually preserves spaces and line breaks. The text is also rendered as equal-width fonts, which can cause a broken paragraph of the label (such as title, and label) to never be included in the defined block, and the allowed text in the pre element can include physical and content-based style changes, as well as links, images, and horizontal dividers<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR></H2>            </ Section>        </Div>                  <asideclass= "sidebar">                <H2>Sidebar Content</H2>            </aside>        </Main>        <Footerclass= "Footer-wrapper">            <Divclass= "Footer">                <H2>Footer Content</H2>            </Div>        </Footer>    </Body></HTML>

html-v12.25+ Classroom Exercises-layout left fixed right adaptive

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.