I have this structure:
<div class="father">
This string is left-aligned
<div class="divToCenter" style="display:inline-block;">
//contains other divs.I used inline block for making this div as large as
//content ATTENTION: its width is not fixed!
</div>
</div>
How could I say :
Let me have ONLY the class named “divToCenter” centered in “father” div.
Thanks
Luca
Float the left aligned string or block to the left, then with
overflow:hiddenon the content it will automatically take up the remaining space and you cantext-alignit how you want.Either that or convert the left content to an inline block too so it and content are side by side and you will be able to
text-aligneachinline-blockseparately.