#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2008
    Posts
    118
    Rep Power
    6

    Question How do I keep the image within the table limit?


    No idea how to do this but I want to make it so the image is never bigger then the table itself. I don't want it to be resized unless if it's too large. What do I do?

    It's for an e-bay template, I think all I can do is work within the body section only.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    295
    Rep Power
    8
    Give you image a CSS style of 'width: 100%'. Or any other percent value.

    By setting that style on the image you are saying "make it 100% width of it's container" (container being your <td> element), so it should not get larger than that.

    Regards,

    NM.
  4. #3
  5. Banned
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,938
    Rep Power
    0
    Hi,

    Originally Posted by Nanomech
    Give you image a CSS style of 'width: 100%'. Or any other percent value.
    No, this will resize the image in any case (which is not what he wants).

    Use max-width and max-height.

IMN logo majestic logo threadwatch logo seochat tools logo