In this case, the text should not flow around the image as when using a float .
Made with CSS tables: https://jsfiddle.net/5p1fLuop/
Is it normal or can it be simplified?
In this case, the text should not flow around the image as when using a float .
Made with CSS tables: https://jsfiddle.net/5p1fLuop/
Is it normal or can it be simplified?
You can not change tags, do everything through styles.
img { max-width: 100%; display: table-cell; } #a { display: table; margin: 0 auto; table-layout: fixed; text-align: center; } #b { display: block; white-space: nowrap; } <div id='a'> <img src='..path/img.jpg'> <div id='b'>Привет мистер бобёр!</div> </div> Apply the figcaption element from standard CTML5:
<figure style=text-align:center> <img style=max-width:100% src='http://webmandry.com/images/stories/2013/03/013-biver/3.jpg'> <figcaption style=font-family:Verdana>Привет мистер бобёр!</figcaption> </figure> Source: https://ru.stackoverflow.com/questions/582341/
All Articles