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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:30:17+00:00 2026-05-31T09:30:17+00:00

I have a HTML+CSS grid layout as in this screenshot , which is essentially

  • 0

I have a HTML+CSS grid layout as in this screenshot, which is essentially a column-oriented table (vs. the row-oriented HTML <table>, which is constructed row-by-row).

To achieve this layout, I have the backing grid constructed from <div>s, and the value groups as right-floating <table>s. Originally, I had the value groups as <div>s as well, but that requires fixed cell widths (esp. with cells spanning multiple columns), so now I’m using tables for the value groups. Either way though, I’m able to have a variable number of value groups, which I need.

What I’d like to do is use a <table> for the backing grid as well, so I can get all of the nice row-spanning and column-spanning for free. However, this has proven to be a difficult task, because the table element is treated as a single block in flow (elements cannot flow around it).

So my question is this: Could I possibly use a table for the “backing grid” in my layout, using only HTML + CSS? Also, feel free to suggest different approaches for the construction of this layout altogether.

edit:

I should have mentioned that this layout is to be generated dynamically, and it follows that single-table solution won’t work. This is because, in this case, the items are static, but the value groups are not. I need to be able to easily add/remove value groups, so that this can be generated using a template engine such as {{mustache}}. With a single-table solution, in order to add a value group, every <tr> must have an additional set of <td>‘s added, which is definitely non-trivial when using any templating engine, but especially with {{mustache}}, which is what I’m using.

For example, my source data (in JSON) might look like:

{
   "oneTwoTotal": "$0.00",
   "valueGroups":[
      {
         "groupName":"ValueGroup1",
         "values":[
            {
               "subgroupName":"Column 1",
               "item1":"$0.00",
               "item2":"$0.00",
               "item3":"$0.00",
               "total":"$0.00"
            },
            {
               "subgroupName":"Column 2",
               "item1":"$0.00",
               "item2":"$0.00",
               "item3":"$0.00",
               "total":"$0.00"
            }
         ]
      },
      {
         "groupName":"ValueGroup2",
         "values":[
            {
               "subgroupName":"Column 1",
               "item1":"$0.00",
               "item2":"$0.00",
               "item3":"$0.00",
               "total":"$0.00"
            },
            {
               "subgroupName":"Column 2",
               "item1":"$0.00",
               "item2":"$0.00",
               "item3":"$0.00",
               "total":"$0.00"
            }
         ]
      }
   ]
}

Imagine constructing the single-table solution with a templating engine, using this data.

  • 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-05-31T09:30:18+00:00Added an answer on May 31, 2026 at 9:30 am

    Here’s what I ended up doing: http://fiddle.jshell.net/gGaXj/30/ . At the top level, I have a container div with position: relative. Inside the container is a backing table, and another div with position: absolute with right: 0; top: 0; (positioned over the container) containing my right-floating value group tables. With this solution, I have the ease of using tables with rowspan/colspan, and the ease & speed of iterating over value-groups only once to add them to the layout. Plus, it’s cross/legacy browser compatible, where a div + CSS table wouldn’t be as much.

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

Sidebar

Related Questions

I'm using the Blueprint CSS grid for my HTML page. I have a table
I have an HTML table that I use as column headers to a grid
I have large URL(without spaces) in one of my Table(html table element) cell which
I have a problem with my first fluid grid layout. This layout looks displaced(varying
I have html and css as below - .title { display: block; background-color: red;
I have HTML + CSS text. I need some lib with simple function like
I have a html/css based menu and I'm trying to put a flash video
I have such html and css. <div class=selected> <div class=text>First</div> <div class=arrow>&nbsp;</div> </div> .selected
I have the following html/css that is causing problems in Firefox 1.5 and 2,
I have the following html/css code . When I have the screen resolution to

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.