treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Image inside Table Problem

  • I have a page on my website with a table on it that I would like to insert some images in. When I try to put them in the one column on the left hand side it does not work.
    Any help would be great, thanks
    http://petrowest.squarespace.com/fleet/
  • Works fine for me! Just put the <img /> inside the <span> that you have in the table.

    http://cl.ly/2y080H1S2z370X2D3n3b
  • @TheDoc Thanks man, I got everything to work. I just had a stupid error that I kept missing.
  • Hello everyone,
    I have a table that I need a little help with. http://petrowest.squarespace.com/fleet/
    I would ideally like all the cells disabled so that nothing happens when clicked and no hover. Also to have a light grey background in alternate rows to break things up.
    Thanks!
  • In your css remove
    /* Image Hover */
    a img:hover{ opacity: 0.8;box-shadow: 0 1px 7px black;}


    Then in Equipment Fleet Table css Remove
    #SelectionTable a:hover {background-color: #fff;}

    and Add
    /* Alternate Rows */
    #SelectionTable a:nth-child(odd) { background-color:#999; }

    or for even add
    /* Alternate Rows */
    #SelectionTable a:nth-child(even) { background-color:#999; }

    You also have cursor:pointer in this line if you want to remove it.
    #SelectionTable span {padding-left:20px;display: inline-block;width: 30%;cursor: pointer;}