I'm facing a situation that has been discussed before on this platform. However, I want to present my problem in a different light. I am working with PHP and need to display an HTML string from the database on my webpage. The issue is that the CSS applied to the page is very generic, causing it to also affect the styling of the HTML string. I specifically want the content to appear without any styling at all. Despite searching online, all I found was information about using the "not" selector in CSS. Is there a way to target a single element on my HTML page that will not be affected by the general styling/CSS? While the "not" selector targets all elements except the one specified, I actually need the opposite effect.
<style>
.div-class p{font-weight: bold;}
.div-class p:not(.no-style){font-weight: normal;}
</style>
<div class="div-class">
<p>This should be bold.</p>
<p class="no-style">This should not be bold.</p>
</div>
My objective is for the "p" element with the "no-style" class to have a normal font weight, whereas currently it is the reverse. I hope I have explained myself clearly.
Thank you,