将表格单元格字体更改为粗体
I am working with a web template which I download. So I define a table such as:- table class="table table-striped table-bordered bootstrap-datatable datatable">
我正在使用一个我下载的web模板。因此,我定义了一个表,例如:- table类=“表条形表边界引导的bootstrap-datatable”>
<thead>
<tr>
<th></th> <th></th>
</tr></thead>
<tbody>
<tr>
<td class="center" >
@Html.LabelFor(model => model.AccountDefinition.ORG_NAME)
</td>
<td>@Html.DisplayFor(model => model.AccountDefinition.ORG_NAME)</td>
</tr>
<tr>
<td class="center">
@Html.LabelFor(model => model.AccountDefinition.LOGIN_URI)
</td>
I search the template for .center
class, but I can not find any other reference to .center except insidethis
我搜索了。center类的模板,但是除了在这个里面,我找不到任何其他对。center的引用
div.center,p.center,img.center{
margin-left: auto !important;
margin-right: auto !important;
float:none !important;
display: block;
text-align:center;
}
So I added
所以我添加了
font-weight:bold
to the above css so it looks as:-
对于上面的css,它看起来是:-
div.center,p.center,img.center{
margin-left: auto !important;
margin-right: auto !important;
float:none !important;
display: block;
text-align:center;
font-weight:bold;
}
But still the table cells font will not be bold? Any idea about how to fix it? BR
但是表格单元格字体还是不会粗体?你知道怎么修理吗?BR
2 个解决方案
#1
3
You have applied the bold style to div
, p
and img
tag. And you are using it into td tag so change the following line:
您已经将粗体样式应用于div、p和img标记。你正在使用它到td标签,所以改变以下一行:
div.center,p.center,img.center{
with this:
用这个:
div.center,p.center,img.center,td.center{
EDITED:
编辑:
If you want to make the text align center and bold that then add the below css in your css code:
如果你想让文本对齐中心和粗体,然后在你的css代码中添加以下css:
td.center{
text-align:center;
font-weight:bold;
}
更多相关文章
- 如何为django模板中的标记创建动态id
- HTML5实现一个可编辑的模板页面
- 为什么我不用Javascript和Javascript HTML模板构建整个Web应用程
- CSS+HTML+JQuery实现条形图
- PHP连接mysql模板
- 从PHP智能模板中剥离空白
- PHP 网站模板核心类
- php 模板框架之smarty 的下载和安装
- smarty模板引擎变量的传递方法