Good day!
Please tell me what are the options for centering rubber block height. The width of the block is 100px, the height of the content.
Interested options on pure CSS, without using JS.
Good day!
Please tell me what are the options for centering rubber block height. The width of the block is 100px, the height of the content.
Interested options on pure CSS, without using JS.
margin: 0 auto;
but only if the block does not have a float. If it is still set, then wrap the block in another div and set its width and margin
As an option: push the block into the table height = width = 100%:
<table width=100% height=100%> <tr> <td valign='center' style='vertical-align:center;'> <div class='container'></div> </td> </tr> </table>
Source: https://ru.stackoverflow.com/questions/161307/
All Articles