Reputation: 557
I am adding some pages on a wordpress themed website. There is a table with 3 columns: 1st column will be the title (larger font).
Since it looks better and editing is easier, I started using <ul>
instead of <td>
Even though it works fine on JSFIDDLE font-size on the 1st column does not change on wordpress website. I also tried using <span>
instead of <li>
, no luck.
<table class="mytable">
<tr>
<td width="40%">
<span class="span-test">SpTitle</span>
<ul>
<li class="li-test">LiTitle</li>
</ul>
</td>
<td width="30%">
<ul>
<li>Name 1</li>
<li>Name 2</li>
<li>Name 3</li>
<li>Name 4</li>
<li>Name 5</li>
<li>Name 6</li>
</ul>
</td>
<td width="30%">
<ul>
<li>Spec 1</li>
<li>Spec 2</li>
<li>Spec 3</li>
<li>Spec 4</li>
<li>Spec 5</li>
<li>Spec 6</li>
</ul>
</td>
</tr>
Upvotes: 0
Views: 534
Reputation: 287
I think you have style inheritance from upper element, check it with dev. tools in browser. You can also try to set inline style for:
<li style: "font-size: 22px;">Name 1</li>
or add !important in your css file, like this:
td > ul li
{
font-size: 22px !important;">
}
Upvotes: 2