PDA

View Full Version : Placing an image to the left of a Div?


Pinktober
11th July 12, 08:26 AM
Float property not working. I'm using float alone. I wasn't sure about setting margins/padding without knowing if it's necessary using float and in what manner.


The Div I have is in the center of the page and static. There is about 500px of free space between the div and the background page. In that free space, I want an image.

Placing the image within the div doesn't allow me to move it outside the div's borders as far as I know.

I'd like to know how to align an image to the left of a div.

All help appreciated.:$

chrishirst
11th July 12, 12:19 PM
set it to float: left;

To have it display "outside" push it over the parent element outer edge with position: relative, a negative left property and a higher z-index.

Pinktober
11th July 12, 08:27 PM
<IMG STYLE="position: relative; LEFT:-300px; float: Left; z-index:300; WIDTH:384px; HEIGHT:625px" SRC="http://img232.imageshack.us/img232/9020/sidebarj.png">


Did what was asked. Made the image relative with a negative left property.
Set it to float left with a high z index.

The result?

The image still says within the div and does not float outside the div. It pushes all text within the div to the right while it floats left.

What am I doing wrong? Here's a photo of what's happening.

http://img338.imageshack.us/img338/542/whatswrong.jpg

meesa
17th July 12, 03:37 AM
Give me a live link please, and I'll see if I can find the issue.