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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:11:51+00:00 2026-06-05T18:11:51+00:00

My code contains a table that I need to have a fixed width. The

  • 0

My code contains a table that I need to have a fixed width. The table basically has page browsing links. The columns are First,Prev, Some page numbers, Next, Last.
The table gets rendered correctly in both Chrome and Firefox if each of these columns is populated or even if one of (First,Prev) or (Next,last) is populated.

However, if all columns except page number are empty, I get a small row.

The funny thing is that Chrome inspect lists the table width as it should be (about 960px;) but the tbody width is reset to 255px (I don’t even use tbody in my code). I tried setting min-width and table-layout property on each of table,td,tr.

Here is a working code fragment

<div id="maincontent">
        <table id="events_table_end">
            <tr width="100%">
                <td width=5% class="first"></td> 
                <td width=5% ></td> 
                <td width=80%><a href="/events/1?cri=time&amp;order=desc" class="active">1</a></td>
                <td width=5% ></td>
                <td width=5% class="last"></td>
            </tr>
        </table>
    </div>

The relevant CSS portions are:

#maincontent {width:1024px; margin:0 auto; text-align:left;}


#events_table_end {padding:2px; margin:10px; margin-top:0px; padding-top:0; display: block; width:97%; empty-cells:show;}
#events_table_end tr {width:100%; }
#events_table_end td {background:#3F547F;color:#D5DFF3; font-weight:bold;}
#events_table_end a {color:#D5DFF3; padding-right:10px;}
#events_table_end a:hover {color:white;}
#events_table_end a.active {color:#F4F8FF;  text-decoration:none; pointer-events: none; cursor:text;}

#events_table_end td.first {border-bottom-left-radius:15px; -moz-border-radius-bottomleft: 15px;}
#events_table_end td.last {border-bottom-right-radius:15px; -moz-border-radius-bottomright: 15px;}
a.no_underline {text-decoration:none;}
a.table_link:hover {font-weight:bold; color:#122A5A; }

If only this much code is copied onto new HTML file, it is correctly displayed by chrome but not by Firefox.

Any input will be appreciated.

Note: I think the problem can be reproduced on jsfiddle here. Notice how table width is correct but tbody width is not.

  • 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-05T18:11:54+00:00Added an answer on June 5, 2026 at 6:11 pm

    Try removing the following declaration from your #events_table_end {} rule:

    display: block;
    

    If you were to set a CSS display property for a table, the correct value would be table. But you don’t need to set the display property at all.

    An amended Fiddle

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

Sidebar

Related Questions

I have a table called excel that has 3 columns, name , id ,
I have a MySQL table that contains datetime data stored in it. I need
I need to have a JToggleButton (that has custom background) that contains a JPanel
I have an application (Legacy code) that contains interface Icomponent with save() methods and
I have a black box of code that contains many threads. There is no
So I have this SQL table that I need to update. Now we use
I have a table that contains a column called 'id' that is an INT
I have a table that contains in one column a variable length delimited string
I have a database that contains a table of deposits (security deposits, pet deposits,
I have a database table that contains names with accented characters. Like ä and

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.