1

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

2 Answers 2

2

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; }
Sign up to request clarification or add additional context in comments.

1 Comment

LOL I wasn't targeting the font/b tag directly in css. Was targeting just the .quantity_box class and not .quantity_box font/b class, I feel stupid now, thx for the wake up call!!!
0
$("b").remove(":contains('2')");

1 Comment

This is way too broad and will not work with other content on the page

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.