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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:04:08+00:00 2026-06-12T19:04:08+00:00

My code: <table style=width: 500px;> <tr> <td colspan=5> <div style=width: 500px;>colspan_5</div> </td> </tr> <tr>

  • 0

My code:

<table style="width: 500px;">
        <tr>
            <td colspan="5">
                <div style="width: 500px;">colspan_5</div>
            </td>              
        </tr>
        <tr>
            <td colspan="1">
                <div style="width: 100px;">colspan_1</div>
            </td> 
            <td colspan="3">
                <div style="width: 300px;">colspan_3</div>
            </td>                
            <td colspan="1"> 
                <div style="width: 100px;">colspan_1</div>
            </td>               
        </tr>  
        <tr>
            <td colspan="2">
                <div style="width: 200px;">colspan_2</div>
            </td> 
            <td colspan="3">
                <div style="width: 300px;">colspan_3</div>
            </td>                
        </tr> 
        <tr>
            <td colspan="5">
                <div style="width: 500px;">colspan_5</div>
            </td>                                
        </tr> 
</table>​

But result looks wrong. (jsFiddle_example)

How can I fix it?

  • 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-12T19:04:09+00:00Added an answer on June 12, 2026 at 7:04 pm

    The code looks wrong too. Your highest colspan setting is 5, but the most TDs in a row is three. Why is that?

    Why not something like this:

    <table style="width: 500px;">
        <colgroup>
            <col style="width:100px;" />
            <col style="width:200px;" />
            <col style="width:100px;" />
        </colgroup>
        <tr>
            <td colspan="3">
                <div>colspan_5</div>
            </td>              
        </tr>
        <tr>
            <td>
                <div>colspan_1</div>
            </td> 
            <td>
                <div>colspan_3</div>
            </td>                
            <td> 
                <div>colspan_1</div>
            </td>               
        </tr>  
        <tr>
            <td>
                <div>colspan_2</div>
            </td> 
            <td colspan="2">
                <div>colspan_3</div>
            </td>                
        </tr> 
        <tr>
            <td colspan="3">
                <div>colspan_5</div>
            </td>                                
        </tr> 
    </table>​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<div style=width:500px;> <p>To create not a block, but an inline code span,use backticks:Press the
This is our code: <div> <table style=width: 349px> <tr> <td class=style1> <asp:ListBox ID=leftbox runat=server
i have this html code <table style=width: 100%;> <tr> <td> ID </td> <td> <input
Here is my code: <form id=form1 style=height: 800px; width:1000px > <table style=width: 90%; height:
The code is pretty simple: <table id=tabel_user style=width: 100%; border: 0; background-color: white; cellpadding=0
I have code: <display:table name=sessionScope.allUserslist id=userList export=false pagesize=1> <display:column title=Select style=width: 90px;> <input type=checkbox
I have the following code to generate a table listing brand/model/submodel/style for a group
I am trying to add style to a table row in C# code. However,
I have the following code, but it doesn't put the scrolling div anywhere. All
Here is jquery code which hides my table cells with the ID of .style2:

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.