Krish
Krish

Reputation: 2670

Allow image to be wider than containing div

Is there any way to make a div not extend it's width, but make an image which is visible outside the div in IE8? For example, my div might be 200px wide, but the image 250px wide.

Upvotes: 8

Views: 23551

Answers (2)

Marc Costello
Marc Costello

Reputation: 439

You could position the image 'absolute'?

div > img {position:absolute;}

Upvotes: 9

Mr Lister
Mr Lister

Reputation: 46629

Set the div's width to 200px and its overflow to visible.

Upvotes: 3

Related Questions