css - How to make text overlap -


i want make 2 div overlap horizontally. want content inside div overlap well. in below example, aaaaaaa wraps around block , expected behavior have aaaaaaa starts @ left border of div b. how can achieve ?

<div id="a" style="float:left;position:relative; background: #987321; width: 100px; height: 300px; z-index:5; "></div>` <div id="b" style=" background: #555; width: 400px; height: 400px; ">aaaaaaaaaa</div> 

fiddle

try this:

css

<style> div.a { width: 100px; height: 300px; } div.b { position: relative; z-index: 0; width: 400px; height: 400px; margin-top: -300px; border: 1px solid red; } div.c { position: relative; z-index: 1; height: 100%; border: 1px solid blue; } </style> 

html

<div class="a"> <div class="c">div a's content</div> <div class="b">div b's content xxxxx</div> </div> 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -