Getting Rid of extra space within <td> and aligning all text within to Top

Here’s my code:


                    <td class="itemContent">
                        <div>
                            <div>Item #: <b>619</b></div>

                            <div>Price: <b>$39.95</b></div>
                            <div>Qty#: <b>24</b></div>
                        </div>                    
                        
                    </td>
                </tr>

Here’s what it looks like:

My problems:

  1. How can I get rid of the space to the right of the picture in the <td>?
  2. How can I align all content to the top of the <td> without hard codeing valign=“top”? I want to do it in CSS so to get rid of that spacing at the top of the picture.

Hi,

We’d need to see more code to see where the horizontal space is coming from.

To set the alignment of a td use this:


 td {vertical-align:top}

I used FireBug and did not see any other element expanding the width in that area inside the <td>

I tried that vertical-align: top; in a class and added that to the <td> and it had no effect.

Ok, I refreshed, I no longer have the vertical issue…just the right padding issue (width)

problem solved, I just was applying a width: xx; in my style and applied that style to wrong <td> duh…

It’s always something simple like that :slight_smile: