html - Text wrap in position absolute follows edge of parent -


i can't seem find in specs.

when position element absolute text inside element makes element expand until edge of positioned parent text wraps (in firefox 5).

this means if position off right edge of parent text wrap after every word.

can point me described?

    <style type="text/css">      #relative           {          margin: 0 auto;          background: #ccc;          width: 100px;          height: 100px;          position: relative          }        #relative > div           {          background: #f0f;          position: absolute;          top: 0;          left: 150px;          }      </style>      <!--...-->      <div id="relative">          <div>text text text</div>      </div>

set absolutely positioned div width: 100%; or fixed value resolve issue. it's described in normal flow section of the spec.

    <style type="text/css">      #relative           {          margin: 0 auto;          background: #ccc;          width: 100px;          height: 100px;          position: relative          }        #relative > div           {          background: #f0f;          position: absolute;          top: 0;          left: 150px;          width: 100%;          }      </style>      <!--...-->      <div id="relative">          <div>text text text</div>      </div>


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -