Click to See Complete Forum and Search --> : Text Beside an Image


Marci
04-28-2008, 02:55 PM
I am making a page that shows items that we sell. I am working on a shopping cart, but until that gets the bugs out, I wanted to put up a page that shows the items and tells a little bit about it.

If I want say 2 or 3 pictures across and the description to the right of each image, do I need to use tables? If I just try to type to the right of the image, it will only do one line that lines up with the bottom of the image. Then it goes below the image.

Thanks for any help.

ryanbutler
04-28-2008, 04:26 PM
You can do it w/ CSS but it tends to get a little complicated because of floats and the box model calculation. Tables would be the simplest approach and in my opinion, you're dealing with tabular data. In the text description to the right of the image, just apply valign="top" to that cell or apply a css class to that table cell and write this rule:

td.moveup{
vertical-align:top;
}

HTML:

<td class="moveup">