looking for some solutions? You are welcome.

SOLVED: Hide part of an image inside a div without class or id

John Grischam:

I'm trying to hide part of an image wrapped inside a div without class 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 within the div with a class ? thanks in advanced :)

Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots

No comments: