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

  • SEARCH
  • Home
  • 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 4232198
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:03:51+00:00 2026-05-21T02:03:51+00:00

Just so you know, I’m new to html and CSS and I’m sorry if

  • 0

Just so you know, I’m new to html and CSS and I’m sorry if the question is stupid, but I have a problem that seems simple, and yet I’ve been searching for a solution for hours and couldn’t find any. There are many forums discussing similar issues but none of the solutions applied to my particular issue. I have simplified the page as much as I could to isolate the problem and this is what I got:

As you can see, Google Chrome and Safari keep the first cell only as high as its content, exactly as I want it to be displayed. Firefox, however, arbitrarily stretches the cell to a random and unnecessarily long height.

What I have tried with no success so far:

  • Set the first cell height as “auto” (although I think this is already the default).
  • Set the first cell height as 1px
  • Set the “oi” td and/or tr height as “100%”.
  • Set the first cell to “display:block;”, which gave me an even more intriguing result:

https://i.stack.imgur.com/KqBUB.png

How can I specify that I want the cell only as high as its contents? If “auto” doesn’t do that, what does? None of the other possible “height” values seem to do the trick. Does anyone have any idea why this happens and how to fix this problem?

Here’s my code:

<html>
<body>
<table border="1">
 <tr>
  <td>

   1st cell 1st cell<br/>
   1st cell 1st cell<br/>
   1st cell 1st cell<br/>
   1st cell 1st cell<br/>

  </td>
  <td rowspan="2" style="width: 50%; text-align: center;">

   blablablablaabl<br/>
   blablablalablab<br/>
   bkababakbakabka<br/>
   LONG STUFF<br/>
   blablablablaabl<br/>
   blablablalablab<br/>
   bkababakbakabka<br/>
   blablablablaabl<br/>
   blablablalablab<br/>
   bkababakbakabka<br/>
   LONG STUFF<br/>
   blablablablaabl<br/>
   blablablalablab<br/>
   bkababakbakabka<br/>

  </td>
  <td rowspan="2">

   right content

  </td>
 </tr>
 <tr>
  <td>

   oi

  </td>
 </tr>
</table>
</body>
</html>
  • 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-21T02:03:51+00:00Added an answer on May 21, 2026 at 2:03 am

    You need two things:
    1. A doctype.
    2. Set the Td’s height to 1px, content will expand the cell.

        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html>
    
    <body>
    <table border="1">
     <tr>
      <td style="height: 1px;">
    
       1st cell 1st cell<br/>   <br/>
    
      </td>
      <td rowspan="2" style="width: 50%; text-align: center;">
    
       blablablablaabl<br/>
       blablablalablab<br/>
       bkababakbakabka<br/>
       LONG STUFF<br/>
       blablablablaabl<br/>
       blablablalablab<br/>
       bkababakbakabka<br/>
       blablablablaabl<br/>
       blablablalablab<br/>
       bkababakbakabka<br/>
       LONG STUFF<br/>
       blablablablaabl<br/>
       blablablalablab<br/>
       bkababakbakabka<br/>
    
      </td>
      <td rowspan="2">
    
       right content
    
      </td>
     </tr>
     <tr>
      <td>
    
       oi
    
      </td>
     </tr>
    </table>
    </body>
    </html>
    

    Of course, if you want to do this with REAL / VALID html + CSS:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html>
    <style type="text/css">
    <!--
    #column_left {
        float: left;
        width: 20%;
    }
    #column_middle {
        float: left;
        width: 60%;
    }
    #column_right {
        float: left;
        width: 20%;
    }
    .breaker {
        clear: both;
    }
    .pad {
        margin: 10px;
        padding: 1px;
    }
    -->
    </style>
    
    <body>
    <div id="container">
      <div id="column_left">
        <div class="pad">
         <p>Left Column</p>
        </div>
      </div>
      <div id="column_middle">
         <div class="pad">
         <p>Middle Content</p>
         </div>
      </div>
      <div id="column_right">
      <div class="pad">
         <p>right content</p>
        </div>
      </div>
      <div class="breaker"></div>
    </div>
    
    
    </body>
    </html>
    

    See how much cleaner that comes out? Put your styles in a stylesheet and this is reduced to VERY few lines of code for a basic layout.

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

Sidebar

Related Questions

I've got a simple question that I just KNOW won't be possible, but here
Probably a stupid question for most that know DMA and caches... I just know
Before you start pointing me to duplicates just know that I have read nearly
This is going to be a really dumb question, I just know it, but
I am a systems programmer, so i just know some basic css/html. I like
I know how that question looks, but I'm quite serious. I am trying to
I have a question i know a line i just know its slope(m) and
I have a situation that is pretty simple, and I'd like to know the
I'm not a designer but just know enough to tweak around with css. I
I'm very new to Python. I just know what Python is. I have created

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.