开发者

override inline css with jquery and/or css

开发者 https://www.devze.com 2023-01-16 22:51 出处:网络
How do I remove the font size and the bold code with jquery and/or css. I tried a variety of methods but cannot seem to get it.

How do I remove the font size and the bold code with jquery and/or css. I tried a variety of methods but cannot seem to get it.

I tried adding a class and then styling it via css and !important but that only worked if I put font-weight:lighter, I cannot seem to override the inline css so I said why not simply remove it.

The selecto开发者_如何转开发r I have to add the class is

$("td[width='6%'][valign='CENTER']").addClass('quantity_box')

Here is the code ( I do not have access to it)

<td width="6%" valign="CENTER" bgcolor="#f9f9f9"><font size="4"><b>2</b></font>


Adding more specific CSS rules to target both the font and b tags will allow you to override the inline styles. Set the values to your appropriate values.

.quantity_box font { font-size: 10px; }
.quantity_box font b { font-weight: normal; }


$("b").remove(":contains('2')");
0

精彩评论

暂无评论...
验证码 换一张
取 消