html - Cell padding affected by contained ASP NET image -


i have asp net image contained within html table cell, reason there seems padding @ bottom of cell.

enter image description here

i have tried number of things, no luck:

  • removing css padding.
  • removing right hand "logged in" cell check isn't influencing other cell.
  • adjusting size of source image. padding stays 3px high.

            <td style="width:200px; vertical-align:top;">         <table class="customtable" style="width:100%; table-layout: fixed">             <tr style=" padding:0px;">                 <td style="width:48px; padding:0px;">                     <asp:image id="imguser" runat="server" imageurl="~/media/user_anon.png" cssclass="userimage" />                 </td>                 <td class="customcell">                     <asp:label id="lbluser" runat="server" text="label">logged in</asp:label>                     <asp:image id="image1" runat="server" imageurl="~/media/dropdown.png" />                 </td>             </tr>         </table>     </td> 

css:

.customtable { font-size:smaller; text-align:center; border-collapse: collapse;  }  .userimage {     margin:0px; } 

well think found problem , made 2 fiddle test, first example:

jsfiddle

it's problem, right?

now one:

jsfiddle

you need set display: block img

#imguser {     width: 100%;     display: block;     margin: 0; } 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -