Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Add question

You must login to ask question.

Login

Register Now

Register now and start to ask your questions or share your knowledge with your community and friends with answering their questions. Earn points for trustability.

CSS Tricks: Vertical Align

Vertical align inside table-row

HTML:
<div id="container">
    <div class="cell">
        <span>content</span>
        <div>content</div>
    </div>
</div>
 CSS: .cell {
    vertical-align: middle;
    display: table-cell;
}

 

Example Styling for Table:

table {
overflow-x:auto;
border-collapse: collapse;
border-spacing: 0;
width: 100%;
border: 1px solid #ddd;
}

th, td { text-align: left; padding: 8px; vertical-align: middle;}
tr:nth-child(even){background-color: #f2f2f2}

About Floridify TeamProfessional Badge


Follow Me