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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:14:40+00:00 2026-06-14T14:14:40+00:00

My question is very similar to this one . I would like my table

  • 0

My question is very similar to this one. I would like my table to fill its container, but it takes on whatever size it wants to.

The html tags around the table are:

<body>
  <div>
    <section>
      <table id="my_table">

The css for div and section:

div {
    width: 50%;
    margin: 0px auto;
    overflow: hidden;
    padding: 0 0;
}

section {
    float: left;
    margin-bottom: 20px;
}

I am not doing anything fancy with dataTables:

$('#my_table').dataTable()

I tried pretty much everything in the linked post, but I cannot get the dataTables to fill their container. I removed autoWidth and set the 4 columns to be 25% each. This changed their relative sizes but the total width was still too small.

Could this have anything to do with the section tag?

When I enter anything in the search field, the table becomes the appropriate size.

A jsFiddle that replicates the problem for me:
http://jsfiddle.net/mushroom/GHU4f/1/

  • 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-14T14:14:41+00:00Added an answer on June 14, 2026 at 2:14 pm

    Adding width : 100% to the section css fixed the issue:

    section {
        float: left;
        margin-bottom: 20px;
        width:100%;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question popped up a very similar question, this one . But the accepted
i have a very similar question like this one: Rails redirect_to with params so,
I have a question very similar to this one but the answer does not
My question is very similar to this one, and I would have followed up
this oughta be an easy one. My question is very similar to this one
Firstly, I realise that this is a very similar question to this one: Which
My question is very similar to this one: Getting an error in jQuery when
My question is very similar this but I guess I need to take it
My question is very similar to this one Not drawing outside bounds when clipToBounds=NO
I have a very similar problem to the one described in this question .

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.