<div id="videos">
<div id="channel_div" style="display: block;">
<div style="color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans-serif; font-size: 12px; width: 555px;" class="firstVideo">
.. trimmed <table here>
</div>
<div style="color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans-serif; font-size: 12px; width: 555px;">
.. trimmed <table here>
</div>
</div>
</div>
The sample code above contains div
elements within the channel_div that have inline styles from YouTube, causing UI layout issues due to width constraints.
I am looking for a way to remove these styles using jQuery. I attempted the solutions suggested in a related Stack Overflow question, such as:
$('#channel_div div').removeAttr('style');
I also tried:
$('#channel_div > div').removeAttr('style');
However, none of these approaches worked for me. My goal is to set a specific width of 300px on these elements. Any advice or guidance would be greatly appreciated.