Table padding not working

前端 未结 4 1010
长发绾君心
长发绾君心 2021-02-18 15:50

I have a table that sits within a parent div full of body text and other content. I have the following CSS which does not seem to work:

table {width:100%; paddin         


        
4条回答
  •  不要未来只要你来
    2021-02-18 16:14

    You can add the cell padding in the table definition OR if you want to use CSS then use can try this:

    If using CSS:

    
    
    
    Cell1aCell1bCell1c
    Cell2aCell2bCell2c
    Cell3aCell3bCell3c


    If using inline:

    Cell1aCell1bCell1c
    Cell2aCell2bCell2c
    Cell3aCell3bCell3c

    You can see this in action here: http://jsfiddle.net/b5NW5/1/

    Hope it helps

提交回复
热议问题