Basically I need div.content to have a default padding of 15px EXCEPT for when the div has the child div.products-list. If the child div of .products-list exists I need div.content to have no padding. I read and saw several solutions using jquery, but it seems to have no effect. My layout is like this:
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
$(".products-list").parents("div.content").css("padding", "0");
});
</script>
<style>
.content {
padding: 15px;
}
</style>
</head>
<body>
<div class="content">
<div class="products-list"></div>
</div>
</body>
Thanks for any help!