css - displayed 'block' divs inside several 'inline' divs -


my problem can better understood image below.

i have several div elements (div a) have variable size depends on content. displayed inblock inside larger container max-with defined(the large outer rectangle without name). works fine until had inside divs 2 other divs (b , c) image.

i haven´t been successful. i've tried several combinations of css properties display, margin, padding, float... negative margins... tables...

any welcome.

enter image description here


update

the code looks example:

html

 <div style="max-width: 800px;">     <div class="div_a">       <div class="div_b">         short text       </div>       <div class="div_c">         short text       </div>     </div>      <div class="div_a">       <div class="div_b">         looooong text       </div>       <div class="div_c">         looooong text       </div>     </div>      <div class="div_a">       <div class="div_b">         huuuuuge text       </div>       <div class="div_c">         huuuuuge text       </div>     </div> </div> 

css

.div_a{   display: inline; }  .div_b{   display: block; /* doesn't work*/ }  .div_c{   display: block; /* doesn't work*/ } 

if understand correctly, should it:

.div_a{   display: inline-block; } 

:)

...assuming don't have other styles, besides border , spacing properties.

a fiddle example here


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -