I am working on a wordpress website and I am using _tk starter theme which is based on "Underscores" and Bootstrap.
I was styling the widget area from scratch, so I gave margin and padding = 0 to override bootstrap styles.
The problem is this worked for every widget except "Recent Comments" widget!
I checked it with developer tools and found that for recent comments widget ul
and li
, and inline style was forcing it to display some padding.
So I tried to search where this code is injected but failed to understand it. The ul id="recentcomments"
and li class="recentcomments"
reside in default-widgets.php
There is no style attribute assigned to these tags in that file. I tried searching in whole wordpress folder with folder search feature in netbeans but it does not show anywhere.
Here is the link to the screenshot. http://tinypic.com/r/efhwyt/8
I got the answer and it is specific to tk theme only. Its Javascript -- . It was in bootstrap.wp.js file on line 26!
$( '.widget_recent_comments ul#recentcomments li' ).css( 'padding', '5px 15px');