Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the table cells font to be bold

Tags:

html

css

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">

<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

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:-

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

like image 493
john Gu Avatar asked Jul 08 '13 10:07

john Gu


1 Answers

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.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:

td.center{
  text-align:center;
  font-weight:bold;
}
like image 145
Code Lღver Avatar answered Sep 27 '22 21:09

Code Lღver