I'm trying to hide part of an image
wrapped inside a div without clas
s or id
. Since i'm parsing code from a rss feed i can not give class or id to the div (i mean i can do it manually but this means to lose the automated posting). The parent div has a class
and then there are 3 other div-s without class
or id
and within the third div is the image.
<div class="post-body-container"><div><div><div><img src=""></img></div><p>text</p><p>text</p></div></div></div>
What I have done till now:
With this styling I can hide part of the image because i give overflow: hidden to the desired div. (:
<style>.post-body-container div div div {
width: 418px;
height: 200px;
overflow: hidden;</style>
The problem is that even the other div-s receive the same styling (width and height).
My question:
How can I give styling ONLY to the div that wraps the image?