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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:15:58+00:00 2026-05-24T11:15:58+00:00

I have inherited a web forms report laid out using pure HTML and ASP.NET

  • 0

I have inherited a web forms report laid out using pure HTML and ASP.NET server controls, and a common layout pattern is a section laid out using a four column table, with first and third columns used for field labels, and the second and fourth columns for values.

As I’ve been tasked with ‘re-skinning’ the report I thought I’d try and improve the semantics of the markup and remove all tables not used for actual tabular data. After some experiments with definition lists for name-value pairs, I settled instead on an ol/li combination, but I can’t figure out how to get both text elements inside each li to occupy 50% of the width of the whole li element.

This is css for the list:

ol.name-value
{
    list-style: none;
    display: table;
}

ol.name-value li {
    display: table-row;
    border-bottom: 1px solid #E8E8E8;
}

This is the HTML:

<div class="span-12">
    <ol class="name-value" style="width: 100%;">
        <li>                    
            <label for="about">Client</label>
            <span id="about">Apartment Applied Visual Arts</span>
        </li>
        <li>
            <label for="about">Report Date</label>
            <span id="Span1">2011/08/08 16:50:10</span>
        </li>
        <li>
            <label for="about">Report No.</label>
            <span id="Span2">33251</span>
        </li>
    </ol>
</div>

And this is what I get as result. The Report Details section is a two-column table, where the Report Details is the above ordered list. I am trying to get the list

Illustration of styling that isn't working.

  • 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-24T11:15:59+00:00Added an answer on May 24, 2026 at 11:15 am

    Try this:

    ol.name-value {
        list-style: none;
        display: table;
    }
    
    ol.name-value li {
        display: table-row;
        border-bottom: 1px solid #E8E8E8;
    }
    
    ol.name-value li label {
        display: table-cell;
        width: 50%; 
    }
    
    ol.name-value li span {
        display: table-cell;
        width: 50%; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using ASP.NET web forms in Visual Studio 2010. How can I create UI
I have inherited a working VB.NET 2.0 web app that has several User Controls
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a
I inherited this gigantic legacy Java web app using Struts 1.2.4. I have a
This is in ASP.NET. We are using a ExtJS frontend, and have our own
I'm using MS WebDeploy out of Visual Studio 2010 to deploy a ASP.NET 2.0
Solved using this post: Can you convert an ASP.NET MVC Application to a Web
I have created online exam application (web based) in asp.net c#. In my application
We have an ASP.NET web application which uses ASP.NET Ajax. We open it from
I have inherited a poorly written web application that seems to have errors when

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.