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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:15:04+00:00 2026-06-07T14:15:04+00:00

I need help with a HTML layout. I need to show 3 columns for

  • 0

I need help with a HTML layout.

I need to show 3 columns for each table row

Column#1 just has some text in it

Column#2 Has a inner table, with either 1 or 2 rows depending on the contents of Column#3

Column#3 Has x number of rows, each word in the row has a name of a food item. Healthy items are listed first, and (if any) unhealthy items are listed.
If there are ONLY healthy items, column#2 will have 1 row with the word “HEALTHY” in it.
Otherwise, it will display HEALTHY, and the 2nd row will have UNHEALTHY (and it has to lineup with column#3)

So it would look like:

Column#2        Column#3
HEATHLY         Apple
                Pear

Or it may look like:

Column#2        Column#3
HEATHLY         Apple
                Pear
UNHEALTHY       Coffee crispt
                Chocolate milk

And each row in column #2 and column#3 should have grids (border top/bottom) for each row.

How can I do this?

Note: The row border in column#2 should lineup with the row borders in column#3.

I hope I explained this clear enough.

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

    I’m not sure what you’re asking for in particular so here goes:

    <table cellspacing="0">
        <tr>
            <td>Col 1</td>
            <td>Col 2</td>
            <td>Col 3</td>
        </tr>
        <tr>
            <td rowspan="4">Col 1 text goes here</td>
            <td rowspan="2">HEALTHY</td>
            <td>Apple</td>
        </tr>
        <tr>
            <td>Pear</td>
        </tr>
        <tr>
            <td rowspan="2">UNHEALTHY</td>
            <td>Toffee crisp</td>
        </tr>
        <tr>
            <td>Chocolate milk</td>
        </tr>
    </table>
    

    And some pseudo code to generate it:

    foreach c2 in col-2-items
    {
        foreach c3 in c2.col-3-items
        {
            <tr>
                if c3 is first in c2.col-3-items
                {
                    if c2 is first in col-2-items
                    {
                        <td rowspan="all-items.count">Col 1 text goes here</td>
                    }
                    <td rowspan="c2.col-3-items.count">c2.text</td>
                }
                <td>c3.text</td>
            </tr>
        }
    }
    

    Apply top and bottom borders with css. Note also the cellspacing=”0″ on the table.

    <style>
    table
    {
        border-collapse: collapse;
    }
    td
    {
        border-top: solid 1px black;
        border-bottom: solid 1px black;
    }
    </style>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help in building a flexible html layout. I've defined minimum and
I need some help removing spaces after hiding certain HTML elements. In context, I
I need some help in JavaScript, HTML, HTML DOM and DHTML. I am not
I need some help! I try to design my master page by _Layout.html with
I need help in parsing a text file. This text file has a few
I need help to embed a game into HTML, If I did replicate the
I have an HTML help system that I need to convert to SharePoint. The
I need a little help here: I get a file from an HTML upload
I need to create HTML pop-up menu using Perl. Can anyone help me?
Below is the simple layout. I need help with this because when I scaling

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.