My HTML structure looks like this
<div class="container">
<div class="image"><img /></div>
<div class="title_body">
<div class="title">Title</div>
<div class="body">Body text</div>
</div>
</div>
the image is to the left and title+body to the right of the image.
What I want to do is to make the title_body div 100% width if image doesn’t exist.
There is alot of .container’s and I just want to make the div 100% in the container with the missing .image
If (as your title suggests) jQuery is an alternative you could simply do
$('div.container:has(div.image)').addClass('has-img')and then stylediv.container.has-imgdifferently fromdiv.container.