html - Word wrapping around image using floats -


can me problem? trying float .imgfloat p.lead wraps around it. here codes

<article>        <div class="imgfloat">        </div>        <p class="lead">to continue our visual clues editable , non-editable          regions, give second row lighter gray background (since          editable, in 1st-level template), , nested table white          background (since it's editable in both). 2nd_level_template.dwt should         figure 5.to continue our visual clues editable ,         non-editable regions, give second row lighter gray background          (since editable, in 1st-level template), , nested         table white background (since it's editable in both). 2nd_level_template.dwt         should figure 5.         </p> </article> 

css

article p{     text-align:left;     float:left; }  .imgfloat{     float:right;     height:200px;     width:300px;     background-color:#ccc; } 

but result this:

enter image description here

don't float text then.

by removing float:left article p, text naturally wrap around img element, floated, , removed flow.

example here

article p {     text-align:left; } .imgfloat {     float:right;     height:200px;     width:300px;     background-color:#ccc; } 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -