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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:46:21+00:00 2026-05-30T01:46:21+00:00

I would like ta have a table with a minimum height (ex: 100px) so

  • 0

I would like ta have a table with a minimum height (ex: 100px) so when there is no data in this table I still have a minimal height. I also would like to have rows in this table to be aligned on top so that when I have only 1 element in this table this element should not be aligned middle but top.

Here is my result in this jsFiddle so far: http://jsfiddle.net/ttrMe

The problem is that my items are aligned middle.

Thanks for your help.

  • 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-30T01:46:22+00:00Added an answer on May 30, 2026 at 1:46 am

    The other answers have provided vertical-align: top as the answer, which does answer the specific question. However, I think your approach to the border is flawed.

    .tablewrapper {
        border:1px solid #ccc;
        width: 70%;
        min-height: 100px;
        margin: 0 0 5px;
    }
    .mytable {
        width: 100%;
    }
    .mytable th {
        background-color: #ccc;
        height: 20px;
    }
    .mytable td {
        vertical-align: top;
    }
    

    http://jsfiddle.net/ttrMe/16/

    Note, I changed the border to be on the #tablewrapper div element which wraps the .mytable. Also note, I changed the ids to classes so I could have more than one and demonstrate the difference. Additionally, the min-height does not work alone with the table element, but does with the div.

    EDIT

    jsFiddle applies a CSS reset (Normalize CSS checkbox on the left), so you might not see the exact same look in your page unless you also reset. In that case, you’ll probably want:

    .mytable {
        width: 100%;
        border-collapse: collapse;
        border-spacing: 0;
    }
    

    http://jsfiddle.net/ttrMe/17/

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

Sidebar

Related Questions

I have a table with a few rows of data. I would like to
I have this table structure and would like to map it using Fluent Hibernate
I would like to have a table in my Oracle database whose rows act
I would like to have a table with 10 rows 5 of which are
I would like to have a table header that looks like the image shown
I have a Show table, and I would like to have a derived type
I have a table and I would like to be able to set up
I have a table full of cells and i would like to get on
I have a table of housing listings. I would like to keep a maximum
I have a table with a Date column, and I would like to do

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.