Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5848559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:52:35+00:00 2026-05-22T12:52:35+00:00

I have a table defined as follows in HTML: <table border=0 cellpadding=0 cellspacing=0 style=width:100%;>

  • 0

I have a table defined as follows in HTML:

<table border="0" cellpadding="0" cellspacing="0" style="width:100%;">
    <tr style="font-size:small;">
        <th colspan="2">Name</th>
        <th>Abbr.</th>
        <th style="width:100%;">&nbsp;</th>
    </tr>
    <tr>
        <td style="padding:5px;text-align:centered;width:48px;">
            <img src="..." style="max-width:32px" />
        </td>
        <td style="text-align:left;white-space:nowrap;">Some Text</td>
        <td>ABC</td>
        <td>&nbsp;</td>
    </tr>
</table>

Everything renders fine when the image size is 32px or smaller. When the image is larger, it a resized to 32px as expected but the table cell remains at the original width. For instance, if the original image is 100×100, the image is resized to 32×32 but the table cell is displayed with a width of 100px.

What am I missing so that the table cell will render with the correct width regardless of the original size of the image?

UPDATE
I updated the original markup to show the full table layout.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:52:36+00:00Added an answer on May 22, 2026 at 12:52 pm

    I can reproduce your problem in only IE8: http://jsfiddle.net/Dtc5m/

    To fix it in IE8, you can add table-layout: fixed.

    See: http://jsfiddle.net/Dtc5m/1/


    After further discussion in the comments, the accepted solution turned out to be:

    wrap the img in a div, and give the
    div a width equal to the max-width of
    the img. See: http://jsfiddle.net/Dtc5m/6

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table defined (see code snippet below). How can I add a
I have this table in an Oracle DB which has a primary key defined
I have table rows of data in html being filled from a CGI application.
I have a field that is defined as follows: class Subcategory extends BaseSubcategory {}
I have a table defined as: create table Foo ( X integer, Y timestamp,
This issue is driving me mad. I have several tables defined, and CRUD stored
I have a table which defines a child-parent relationship between nodes: CREATE TABLE node
I have a few tables that I've defined like the below examples: class TableA
In my database I have tables that define types for example Table: Publication Types
I have table inside a div tab. The table has 40 rows in it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.