"CSS Basics" ad bit two-column layout

Source: Internet
Author: User

"Problem description" left text, right picture. Above the left is an ad description, and below is "ad X". The ad description above may be one line, two lines, three lines; the opposite position of "ad" and "X" is different.

Before looking at the reference code, you can try to write your own first.

=====================================

"Reference Code"

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <Metahttp-equiv= "X-ua-compatible"content= "Ie=edge">    <Metaname= "Viewport"content= "Width=device-width, initial-scale=1">    <title>Advertising</title>    <style>. section{Line-height:40px;font-size:15px;text-align:Justify;margin:10px 0;position:relative;        }. Relative{position:relative;        }. Clear-fix:after{Clear:both;content: "";Display:Block;        }. Right-img{float: Right;width:150px;Height:120px;        }. Left-txt{Margin-right:150px;        }. Left-txt. P-txt{Min-height:80px;        }. right-img img{width:100%;Height:100%;        }. Pull-right{float: Right;        }    </style></Head><Body>    <Divclass= "section clear-fix">        <Divclass= "Right-img">            <imgsrc= "Head.jpg"alt= "Avatar">        </Div>        <Divclass= "Left-txt">            <Divclass= "P-txt">Where to go Travel Channel in travel guide.</Div>        </Div>        <spanclass= "relative">Advertising</span>        <spanclass= "Pull-right">X</span>    </Div>    <Divclass= "section clear-fix">        <Divclass= "Right-img">            <imgsrc= "Head.jpg"alt= "Avatar">        </Div>        <Divclass= "Left-txt">            <Divclass= "P-txt">Where to go Travel Channel in travel guide. Where to go Travel Channel in travel guide.</Div>        </Div>        <spanclass= "relative">Advertising</span>        <spanclass= "Pull-right">X</span>    </Div>    <Divclass= "section clear-fix">        <Divclass= "Right-img">            <imgsrc= "Head.jpg"alt= "Avatar">        </Div>        <Divclass= "Left-txt">            <Divclass= "P-txt">Where to go Travel Channel in travel guide. Where to go Travel Channel in travel guide. Strategy</Div>        </Div>        <spanclass= "relative">Advertising</span>        <spanclass= "Pull-right">X</span>    </Div></Body></HTML>

"CSS Basics" ad bit two-column layout

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.