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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:42:24+00:00 2026-06-16T10:42:24+00:00

Yes, this is one more question about good old div inside td but without

  • 0

Yes, this is one more question about good old div inside td but without scripts.

td‘s width is defined in pixels.

I want a div (and its inner input) fill the whole td. I made it work in Chrome, but failed in Firefox and IE9. It’s a total mess there. (I don’t care about IE6-8)

Here is the snippet I’m testing on: http://jsfiddle.net/K5D9z/37/.
Is there a generic solution to this?

EDIT

Though I didn’t specify previously, I expect the content of some table cells to grow in height and expand some rows. In IE and FF height: 100% means element will always have the container’s initial height specified in css: http://jsfiddle.net/K5D9z/51/. All of the answers have this issue.

UPDATE

As has been noted in a comment there seems to be no pure css solution. So I resorted to the script setting height in a style attribute for every td according to its calculated height: http://jsfiddle.net/K5D9z/54/.

  • 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-06-16T10:42:26+00:00Added an answer on June 16, 2026 at 10:42 am

    You need to remove position:absolute from .test-cell div, .test-cell input. This is causing the input to be removed from the normal flow of content, so it won’t remain in the td where it is supposed to. This, along with changing height and width from auto to 100% should give you the solution you are looking for.

    .test-cell div, .test-cell input{
      display: block;
      /* position: absolute; Don't use this style */
      height:100%;
      width: 100%;
      /* Don't need these, because it goes along with position absolute
         top:0;
         left:0;
         bottom:0;
         right:0;
      */
      background-color: green;
    }
    

    Fiddle

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

Sidebar

Related Questions

I have already posted another question about this, but no one seemed to know
I know the Sales pitch answer is yes to this question, but is it
Yes, I know this question has been asked before, but I can't find an
Yes, I know this question has been asked a lot of times, but I
yes this question is asked some times. but I can't find an answer for
One more try at this. I've already had my previous question down voted. I
I thought about asking this question in the Mathexchange, but it is less about
This is not a question as such, but more like a list of things
[ Old question title used to be ARC is set to YES, but xcode
This isn't a question that has a black/white yes/no answer, this is more a

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.