css - Aligning paragraphs and sub-paragraphs horizontally -


is there way present data follows using css?example

an article divided paragraphs, , each paragraph has (usually smaller) box/sub-paragraph right of it, horizontally aligned respective paragraph.

yes, possible. here example of how can achieve http://jsfiddle.net/sptzh/1/ html:

<section class="content">     <article class="row">         <p>paragraph a</p>         <div class="teaser">             text related text related text related text related text related text related          </div>     </article>     <article class="row">         <p>paragraph b paragraph b paragraph b paragraph b</p>         <div class="teaser">             text related b         </div>     </article> </section> 

css:

.content {     width: 500px; } .row {     clear: both;     padding: 10px;     border-top: solid 1px #000; } .row:after {     content: "";     display: table;     clear: both; } .row p {     width: 60%;     float: left;     box-sizing: border-box;     -moz-box-sizing: border-box;     padding: 0;     margin: 0;     font-size: 50px; } .row .teaser {     width: 40%;     float: left;     box-sizing: border-box;     -moz-box-sizing: border-box;     padding: 6px;     border: dotted 1px #999; } 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -