How can I style a list of name-value pairs to appear like an HTML table?

后端 未结 1 2057
滥情空心
滥情空心 2021-02-08 03:39

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

相关标签:
1条回答
  • 2021-02-08 04:09

    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 讨论(0)
提交回复
热议问题