I want images to move with the fluid page

anna

New Member
When I place images on a page- I want them to move with the page if the user drags their browser window around. I tried writing a css rule with margin-left: auto; and margin-right: auto; rule, but it is not working.

Any suggestions? Thank you!
 

leroy30

New Member
margin-left and margin-right set to auto will center an element IF it has a fixed width (i.e.300px or 50%) AND only within the parent container which I think must also have a fixed width (cant remember). i.e. if it is in the body tag then make the width of the body 100%.
 

anna

New Member
margin-left and margin-right set to auto will center an element IF it has a fixed width (i.e.300px or 50%) AND only within the parent container which I think must also have a fixed width (cant remember). i.e. if it is in the body tag then make the width of the body 100%.

Thanks for the reply! Yes, that's exactly what I did and it worked. I meant to get on here over the weekend and respond that I had figured it out, so thank you again for your reply!
 
Top