I’m trying to place an image in an HTML table without changing the table borders. What I mean by this is, I’m trying to place the image in a certain cell so that the image stretches outside the cell without increasing the size of the cell (so if there was anything in the way the image would overlap or be overlapped.) By default when I put the image inside the cell it increases the size of the cell so that the text that comes below it gets “pushed down” if you will.
Share
You can specify a width for the table cell and add
overflow: visible;to its styles, then the image should just do its thing and push out however far it naturally wants to.If you want to have the image act independently of everything else in the cell, apply
position: relative;to the table cell andposition: absolute;to the image. You can then usetop,right,bottom, and/orleftvalues accordingly to nudge the image around relative to its (table cell) container.