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 4051226
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T14:10:06+00:00 2026-05-20T14:10:06+00:00

Although some questions similar to this one have been asked before, this one is

  • 0

Although some questions similar to this one have been asked before, this one is a little different.

I have a table that looks a little something like this:

<table>
 <tr>
  <td style="height: 100px;">
   <img src="..." style="height: 100px;" />
   <img src="..." style="height: 100px; position: relative; top: -100px;" />
  </td>
 </tr>
</table>

This will overlay the second image on the first one. However, the td insists on being 200px tall even though there is only 100px of content. Setting the td‘s height does nothing, which seems consistent with the answers to the other questions.

However, I do not have the option of embedding the contents in a DIV and setting the height to 100px because the td will still insist on being 200px tall.

How can I tell the td to just be 100px tall?


Edit: Oh, and using absolute positioning is out of the question too because a lot of DOM manipulation goes on in the page and stuff gets moved around – whereas the absolutely positioned stuff does not.


Edit: jsFiddle example can be found here.

  • 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-20T14:10:07+00:00Added an answer on May 20, 2026 at 2:10 pm

    This has nothing to do with the td really, but with the nature of position: relative. A relative element’s space stays reserved in the document flow.

    Get rid of the relative, and use position: absolute on the first image instead.

    Edit: I just saw your edit. Hmmm. Thinking.

    Two workaround ideas come to mind:

    • Slap a overflow: hidden on the td

    • If that doesn’t work in all browsers or isn’t valid (I’m not 100% sure right now) Put the two images into a <div height='100px;'> and put a overflow: hidden on that.

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

Sidebar

Related Questions

This is similar to one of my previous questions here , although this is
There have been some similar questions in stackoverflow but none of them answers my
Although there are some similar questions I’m having difficulties finding an answer on how
Although I have found some solutions to this problem, none of them refer to
I realise there have probably been a few questions with a title similar to
Okay, I am stumped on this one and need some quick help. I have
I've been struggling with this for quite some time now, although I am pretty
I'm kind of new to WPF although I have some experience in Forms, and
I am a total newbie in servers/hosting etc, although I have some experience in
I've seen from some sources that although you can make an exe or mac

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.