Stylock Stylock - 1 year ago 95
HTML Question

Force images to overflow in table cells

How to force images to overflow in table cells without expanding the cells?


Sorry, I'll provide some more information. This is the table:

<table class="content">
<col width="200px" />
<col width="560px" />
<col width="200px" />
<td colspan="3" class="logo"></td>


height: 120px;
background: url('img/wallpaper.png') center;

I thought there would be a simple solution...

xec xec
Answer Source

If you use an <img> tag instead of a background image, you could remove it from document flow with position: absolute;


<td class="logo">
    <img src="img/wallpaper.png">


.logo img {
    position: absolute;

This will let the image overflow the cell, but creates other side-effects you would need to deal with. Update top or bottom accordingly to keep the image in place.

Adjusted css

.logo img {
    position: absolute;
    top: 15px;

Check out

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download