Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2008
    Thanked 0 Times in 0 Posts

    Creating a Table With Pictures/Text

    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!

  • #2
    Regular Coder
    Join Date
    May 2009
    Thanked 24 Times in 24 Posts


    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.

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Thanked 603 Times in 583 Posts
    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...
    my site (updated 2014/10/20)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.3, IE11:9.2, IE9:2.7, IE10:2.6, FF:16.8, CH:47.5, SF:7.8, NON-MOUSE:37%


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts