Home  >  Article  >  Web Front-end  >  Table tbody adds horizontal scroll bar_html/css_WEB-ITnose

Table tbody adds horizontal scroll bar_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:38:421800browse

I want to add a horizontal scroll bar to the table body


But after adding it, the resulting grid lines become messy.

Normally this kind of grid adds a horizontal scroll bar under its tbody


Code———————————————————————————— ---------------------------------

CSS:




html:-------------------------------------------------- -------------------------------------------------- -----------------------------------------------



                                  ="width:1200px; min -height: 400px;">
                                                                                                                  .png" /> >
" style="width: 80px;">Available time

  " style="width: 80px;">Gross weight : 80px;">Net weight
;Volume
; : 100px;"> JYZ-V5043
                                                                                                                                                ​Machine
        
                                                                       
                                                                                                    ;td style="width: 80px;">2014-09-08
"width: 80px;">4
;0.919
                                       
                                                              < Multifunctional electric juice machine
                                 < ;/td>
                                                                        <
                                                                                    < ;td style="width: 80px;">4
        
        
      
      
        
        
        
        
        
        
        
        
        
        
        
        
      
      
        
        
        
        
        
        
        
        
        
        
        
        
      
    
  
Specification model< /th> < th scope="col" style="width: 80px;">Category Barcode prefix Round up the quantity JYZ-V5 JYZ-V5043 0.919 0.867
 JYZ-V5043 Joyoung/九阳 JYZ-V5原汁机慢速榨汁机家用低速多功能电动果汁机 JYZ-V5 JYZ 九阳 果汁机 2014-09-08 0908 4 0.989 0.919 0.867
 JYZ-V5043 Joyoung/九阳 JYZ-V5原汁机慢速榨汁机家用低速多功能电动果汁机 JYZ-V5 JYZ 九阳 果汁机 2014-09-08 0908 4 0.989 0.919 0.867
 
  


Reply to discussion (solution)

.newtable tr {
/*display:table-row;*/
display: inline-flex;
border-left: 1px solid #999;
border-top: 1px solid #999;*/
}
Remove the comment end tag of the second line


    body {
        font-size: 12px;
        text-align: center;
    }

    /*newtable*/

    .newtable {
        /* border-top: 1px solid #999;
                    border-right: 1px solid #999;
                    border-spacing: 0;*/
    }

    .newtable 
    {
        background-color:black;
    }
        .newtable thead {
            border-right: 1px solid #999;
        }

        .newtable tbody {
            display: block;
            
            /*border-right: 1px solid #999;*/
        }

       

        .newtable th {
            padding-top: 8px;
            padding-bottom: 8px;
            background-color:white;
            /*border: 1px solid #999;*/
            /*border-collapse: separate;*/
            /*border-right: 1px solid #999;
                    border-left: 1px solid #999;
                    border-bottom: 1px solid #999;*/
        }

        .newtable td {
            background-color: white;
            padding-top: 8px;
            padding-bottom: 8px;
            /*border-right: 1px solid #999;
                    border-left: 1px solid #999;
                    border-bottom: 1px solid #999;*/
        }




    
        
            
        
        
            
                产品编码
                产品名称
                规格型号
                助记码
                品牌
                品类
                上市时间
                条码前缀
                凑整数量
                毛重
                净重
                体积
            
            
                 JYZ-V5043
                Joyoung/九阳 JYZ-V5原汁机慢速榨汁机家用低速多功能电动果汁机
                JYZ-V5
                JYZ
                九阳
                果汁机
                2014-09-08
                0908
                4
                0.989
                0.919
                0.867
            
            
                 JYZ-V5043
                Joyoung/九阳 JYZ-V5原汁机慢速榨汁机家用低速多功能电动果汁机
                JYZ-V5
                JYZ
                九阳
                果汁机
                2014-09-08
                0908
                4
                0.989
                0.919
                0.867
            
            
                 JYZ-V5043
                Joyoung/九阳 JYZ-V5原汁机慢速榨汁机家用低速多功能电动果汁机
                JYZ-V5
                JYZ
                九阳
                果汁机
                2014-09-08
                0908
                4
                0.989
                0.919
                0.867
            
            
                 JYZ-V5043
                Joyoung/九阳 JYZ-V5原汁机慢速榨汁机家用低速多功能电动果汁机
                JYZ-V5
                JYZ
                九阳
                果汁机
                2014-09-08
                0908
                4
                0.989
                0.919
                0.867
            
        
    

.newtable tr {
/*display:table-row;*/
display: inline-flex;
border-left: 1px solid #999;
border-top: 1px solid #999;*/
}
Remove the comment end tag of the second line



That means you don’t need the entire line? Then there are no scroll bars.


.newtable tr {
/*display:table-row;*/
display: inline-flex;
border-left: 1px solid #999;
border-top: 1px solid #999;*/
}
Remove the comment end tag of the second line



That means you don’t need the entire line? Then there are no scroll bars.
border-left: 1px solid #999;
border-top: 1px solid #999;*/
Remove these 2 lines

Aunt A is awake and awake

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:css relief effect_html/css_WEB-ITnoseNext article:css relief effect_html/css_WEB-ITnose

Related articles

See more