Tried these two and they don’t work. It seems something really simple but cannot find anything on this topic.
CSS:
#element * { padding: 0; margin 0; }
jQuery:
$("#element").children("*").css("padding", "0");
$("#element").children("*").css("margin", "0");
Thank you in advance.
You want to use .find if you’re going the jQuery route. .children only goes a single level deep.
$('#element').find('*').css('padding', '0');http://jsfiddle.net/gromer/yg3CL/1/
Pure CSS: