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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:33:07+00:00 2026-06-10T19:33:07+00:00

I have a 2 column layout with a sidebar and a main div containing

  • 0

I have a 2 column layout with a sidebar and a main div containing a table.

The sidebar has a fixed width and the main div should have a flexible width so it will always stretch to the end of the screen. Is there a CSS way to do that or do I need to use JavaScript?

HTML

<div id="content" data-role="content" role="main">
    <section>       
        ....
    </section>
    <div id="gridContainer">
        <table border="0" id="tblBrvGrid" class = "background" data-sort = "Name" data-asc_desc = "asc" data-filter = "">               
        <thead>
            <tr>
                <th></th>
                <th class="service sortable" data-field="Name" I18N="COLUMN_HEADER_SERVICE">
                    <span class="sort-asc"></span>
                </th>
                <th I18N="COLUMN_HEADER_STATUS"></th>
                <th I18N="COLUMN_HEADER_PERFORMANCE"></th>
                <th></th>
            </tr>
        </thead>
        <tbody>
            ....
        </tbody>
    </table>
    <a id ="gridPaging" class="more-data-active" I18N="MORE_DATA" data-role="button" data-theme="g"></a>
    </div>
    <!-- end #gridContainer -->
</div>
<!-- end #content -->

CSS

section {
  float: left;
  width: 255px;
  border-right: 1px solid #DDDDDD;
}

#gridContainer {
  float: left;
  padding-left: 10px;
  min-width: 70%;
}

table {
  color: #222;
  width: 100%;
}

And here is a more elaborate fiddle: http://jsfiddle.net/RmQR6/

  • 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-10T19:33:08+00:00Added an answer on June 10, 2026 at 7:33 pm

    If i understand correctly then may that’s http://jsfiddle.net/RmQR6/1/ you want. Write like this:

    #gridContainer {
      padding-left: 10px;
      overflow:hidden;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a 3 column layout using table-less design. <div id=main> <div id=left></div> <div
I have the age-old problem of a div wrapping a two-column layout. My sidebar
I have seen several methods for creating simple fixed width single column layout using
I currently have a 2 column site layout, with a footer/header, a fixed width
I have a two column site layout that has the content of the left
The home page of this site will have basically a 3 column layout. I
Pulling my hair out with this simple CSS layout. I have a 2-column fixed
I have a two column layout, with a gray sidebar on the right. I
I'm trying to make a CSS fixed width, two column, header and footer layout.
I have a two-column layout, sidebar on the left, content on the right. So

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.