php - 如何修改表格内容的字体大小

标签 php html css fonts html-table

在我的表格中,我正在尝试更改字体大小。我试过在标签中添加字体大小,在 Myposts 类的 CSS 代码中添加它,但没有成功。如何更改字体大小?

  <table width="100%" border="0" class = "Myposts"; align="center" cellpadding="3" cellspacing="1"  bgcolor="#686868 " >
  <tr>
   <td width="6%" align="center" bgcolor="#505050 " ><strong>#</strong></td>
   <td width="53%" align="center" bgcolor="#505050 "><strong>Job Description</strong></td>
   <td width="15%" align="center" bgcolor="#505050 "><strong>Views</strong></td>
   <td width="13%" align="center" bgcolor="#505050 "><strong>Replies</strong></td>
   <td width="13%" align="center" bgcolor="#505050 "><strong>Date/Time</strong></td>
  </tr>

最佳答案

您可以在 CSS 中选择表格单元格

table.Myposts tr td {
 font-size: 18px;
}

关于php - 如何修改表格内容的字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22898344/

相关文章:

html - Bootstrap 选择选项比输入宽

html - 我们在 Bootstrap 中有任何组框吗

javascript - 简单的一页水平滚动?

html - 我怎样才能使一个元素的 sibling 定位绝对,正常定位?

javascript - 去掉垂直滚动条,只设计水平滚动条

php - sql 填充下拉列表以包含数据库值

php - WordPress 以编程方式搜索结果

php - 通过查询参数过滤路由的更好方法?

php - AWS Elastic Beanstalk for PHP 通过 CLI 上传 ZIP off 应用程序

javascript - 最后一个 child 的最后一个 child 的风格