How to define CellPadding in GridView in ASP.NET

前端 未结 3 1931
难免孤独
难免孤独 2021-02-20 05:55
  • I autoformat a GridView in ASP.NET.
  • It looks nice but the headers all run together like this:

    idfirstNamelastNameage

  • I

3条回答
  •  伪装坚强ぢ
    2021-02-20 06:30

    Check the generated HTML and find the table it has created. Check the ID of the table. With the id, add following lines to your CSS. This worked for me when all else failed..

    #YourTableIdFoo th , #YourTableIdFoo td 
    {
        padding-right:      1em;
    }
    

提交回复
热议问题