Home > other >  Cropped image in table
Cropped image in table

Time:11-26

I am imploding image through css i looks like this: click here to see the image

But I want it to look like this: click here to see what I want

Image is in td tag

Here is css code:

a#id {
    background: url('maps.jpg') no-repeat right center;
    padding-right: 70px;
}

EDITED: html code:

<td colspan="2"><a href="#" id="id" target="_blank" style="display: none"><span class="label">Text </span></a></td>

CodePudding user response:

Add padding on top and bottom also. Try below code

a#id {
    background: url('maps.jpg') no-repeat right center;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-right: 70px; /* padding-right = width of the photo */
}
  •  Tags:  
  • css
  • Related