문제

I got a piece of code as seen in the image below in a Smarty template outputting the payment method. Please help me a find a way to set color "red" only to the value of "{$search_results_list[searchresults].cc_type}". Thank you.

enter image description here

도움이 되었습니까?

해결책

What does the surrounding HTML look like?

If you cannot edit the HTML to add classes you could use :nth selector to select that second span tag, ie.

.surrounding-div span:nth-child(2) {color: red;}

Or if there are multiple span elements you could get more specific like this:

.surrounding-div span[title^="Payment"]:nth-of-type(2) {color: red;}

If you provide more of the template HTML it would be easier to answer more accurately.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top