images to fit tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neilbigh
    New Member
    • Nov 2006
    • 1

    images to fit tables

    hi all new to html been playing with tables when i put images in in the table it distorts the the rest ot the table, is there anyway you can sort of get them to either shrink or expand to fit without distoting the rest of the table many thanks

    neilbigh
  • AricC
    Recognized Expert Top Contributor
    • Oct 2006
    • 1885

    #2
    Do you want to shrink the table or the image? Either way you can apply a style to the element like so:

    Inline CSS
    style="width: 100px; height: 200px"

    HTH,
    Aric

    Comment

    • darkdirk1
      New Member
      • Oct 2006
      • 50

      #3
      except dont use inline its a bad habit to get into if just starting.
      Give your image an ID then reference that ID in your stylesheet and set the dimensions there.

      Code:
      <style>
      img#pic1{
      width: 250px;
      }
      </style>
      
      <img src="lala.jpg" id="pic1">

      Comment

      Working...