Changing the font of table cells will be bold

I am working with a web template that I am uploading. Therefore, I define a table such as: - table class = "table with table-striped column with 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 am looking for a template for the .center class, but I cannot find any other link to the .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 like this: -

 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 font of the cell cell will not be in bold? Any idea on how to fix this? BR

+4
source share
2 answers

You applied bold style to the div , p and img tags. And you use it in the td tag to change the following line:

 div.center,p.center,img.center{ 

with this:

 div.center,p.center,img.center,td.center{ 

Edition:

If you want the text to be centered and in bold, then add the css code below to the css code:

 td.center{ text-align:center; font-weight:bold; } 
+3
source

The CSS selector you have does not apply to <td> elements. As you can see from the selector, it applies only to the <div> , <p> and <img/> elements. You can add this:

 td.center { text-align:center; } 

Or add it to your existing CSS selector:

 div.center, p.center, img.center, td.center { margin-left: auto !important; margin-right: auto !important; float:none !important; display: block; text-align:center; } 
+1
source

Source: https://habr.com/ru/post/1490252/


All Articles