Make a div fill the height of the remaining screen space

2015 update: the flexbox approach There are two other answers briefly mentioning flexbox; however, that was more than two years ago, and they don’t provide any examples. The specification for flexbox has definitely settled now. Note: Though CSS Flexible Boxes Layout specification is at the Candidate Recommendation stage, not all browsers have implemented it. WebKit … Read more

Adding a table row in jQuery

The approach you suggest is not guaranteed to give you the result you’re looking for – what if you had a tbody for example: <table id=”myTable”> <tbody> <tr>…</tr> <tr>…</tr> </tbody> </table> You would end up with the following: <table id=”myTable”> <tbody> <tr>…</tr> <tr>…</tr> </tbody> <tr>…</tr> </table> I would therefore recommend this approach instead: $(‘#myTable tr:last’).after(‘<tr>…</tr><tr>…</tr>’); … Read more

Set cellpadding and cellspacing in CSS?

Basics For controlling “cellpadding” in CSS, you can simply use padding on table cells. E.g. for 10px of “cellpadding”: td { padding: 10px; } For “cellspacing”, you can apply the border-spacing CSS property to your table. E.g. for 10px of “cellspacing”: table { border-spacing: 10px; border-collapse: separate; } This property will even allow separate horizontal … Read more

tech