View Full Version : Creating a Table With Pictures/Text

01-13-2010, 10:36 PM
I am looking to create a table of sorts with pictures and texts, the point is to try to provide easy access to the most popular posts on my website. I envisioned a table with something like two columns and three rows (quite possibly with no border). Two pictures running width-wise, text underneath, and repeat that two or three times to create a top six or top nine. An example close to what I am looking for can be found on wwtdd dot com, in the right sidebar labeled "crowd faves."

The most important part of the table is that it *must* contain a way to control the width and height automatically. Meaning, if I want to use an image larger than what's meant for the table, it automatically resizes that image to fit the table.

I would really appreciate any help I could get with this table. I am a true novice when it comes to HTML and I think this table would add some real functionality to my website.

Thank you in advance for your help!

01-14-2010, 02:47 PM
Have you considered making all your images the same size so that they fit the table cells anyway. It would be difficult for you to resize images based on the table cell size automatically. Better the other way round. Is this what you meant? The link you stated does not exist so there is no way of knowing what you mean.

rnd me
01-14-2010, 11:47 PM
you can set the height or width attrib of an image to get it to fit.
if you only set one, the other will adjest as needed to preserve the aspect ratio.

max-height in css can also keep img under a certain size, but i don't know if it preserves aspect ratios...