Wednesday, November 23, 2011

To use a jQuery UI icon, you need to include both the class "ui-icon" in addition to the class of the icon itself.  For example, to show the up arrow icon, you could use:

 

Blogger is the shittiest blogging platform imaginable!  How the fuck do I do preformatted text?  THIS IS WHY PEOPLE WRITE THEIR OWN BLOGGING PLATFORMS!  God fucking damn.

Friday, October 14, 2011

Combining fixed-width table columns with percentage width

In other words, say you want to have a table where the first three columns take up an exact width and you want the last column to take the remainder.   The initial approach I would have taken would be:
<table style="width:90%;border:1px black solid">
    <tr>
        <td style="width:100px;">Column 1td>
        <td style="width:100px;">Column 2td>
        <td style="width:100%"><div>Column 3, remainderdiv>td>
    tr>
table>
Which produces:


Obviously this is upsetting.  Column1 and Column2 are being squished and are not taking up the designated 100px.  Note that until setting the 3rd column to "width:100%" the pixel settings worked fine.

The trick is to wrap the contents of each cell in divs and for the fixed-width columns, you should specify the width in the
element rather than in the element:
<table style="width:90%;border: 1px black solid">
    <tr>
        <td><div style="width:100px;">Column 1div>td>
        <td><div style="width:100px;">Column 2div>td>
        <td style="width:100%"><div>Column 3, remainder<div>td>
    tr>
table>
This produces the much more desirable result:


P.S. Blogger sucks and fucked up my formatting and angle brackets.