...

View Full Version : CSS image positioning



misslilbit02
09-05-2011, 07:03 PM
I have this site whereby I want to put an image in a fixed positon on a site relative to the div that it is in. So I've read about it and it's not coming out the way I want it so I'm looking for assistance. What I want to do is this (http://www.purseempowerment.com/images/10-things-shanifullbody.jpg)

But I have this (http://www.purseempowerment.com)

The code I'm using on the image in the HTML is this.

<div style="position:relative;"><img src="images/shani.png" class="pos_fixed"/></div>

The code in the CSS file is this


div.pos_fixed
{
/*position:inherit;*/
position:absolute;
top:461px;
/*right:5px;*/
left:0px;
}

tracknut
09-05-2011, 07:22 PM
Change this:


div.pos_fixed


to:


img.pos_fixed


since you're applying the class to an img, and not to a div. That should get you going in the right direction.

Dave

misslilbit02
09-05-2011, 10:38 PM
This helps alot!!

misslilbit02
09-06-2011, 01:33 AM
I've gotten a solution Thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum