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;
}

更多相关文章

  1. 如何为django模板中的标记创建动态id
  2. HTML5实现一个可编辑的模板页面
  3. 为什么我不用Javascript和Javascript HTML模板构建整个Web应用程
  4. CSS+HTML+JQuery实现条形图
  5. PHP连接mysql模板
  6. 从PHP智能模板中剥离空白
  7. PHP 网站模板核心类
  8. php 模板框架之smarty 的下载和安装
  9. smarty模板引擎变量的传递方法

随机推荐

  1. JqueryUI Draggable - 仅自动垂直调整父
  2. iKcamp出品|全网最新|微信小程序|基于最新版
  3. 如何使用变量填充iframe源?
  4. 使信号器生成的代理集线器动态
  5. 只有在读取数据库后才选择(案例)(开关)
  6. 未捕获的IndexSizeError:未能在'HTMLTabl
  7. 使用jQuery导出JSON(外部文件)导入数据的度
  8. 删除复制+粘贴的富文本格式? (跨浏览器)
  9. 如何在页面上获得带有javascript的特定单
  10. 在提交表单之前确定重复值