#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
    298
    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. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1045
    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.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".

IMN logo majestic logo threadwatch logo seochat tools logo