PDA

View Full Version : Layout DIV Help


Sheep316
06-04-2009, 12:44 PM
Hi, I have centred my div with my image inside the div using css. This works fine and my div is locked to the centre of the page.

I want to begin inserting content, such as images and text inside my centred div. I'm not sure were to go from here or how to go about doing this?

I have used ap divs but as they are absolute positioned it means when I minimize my window on my internet browser the ap divs with my images and text stay static BUT my centred div stays posited in the centre at all times. This means the two donít stay relative to each other and make it look like a disaster.

Is there a way to position your ap divs anywhere on the page WHILST making them move in relation to my centred layout image?

Any other help or suggestions on how to fix this would be much appreciated. Thank you. Ciaran

Corrosive
06-04-2009, 02:07 PM
This means the two donít stay relative to each other and make it look like a

You've really answered your own question here. Use relative positioning for your divs/layout.

Sheep316
06-04-2009, 10:53 PM
You've really answered your own question here. Use relative positioning for your divs/layout.

But when I go to insert a relative ap div i don't have the ability to position it anywhere I want on the page :-?

Unless there's a way of doing it i haven't figured out?

Thanks.

edbr
06-05-2009, 01:24 AM
Unless there's a way of doing it i haven't figured out?
you are looking at it incorrectly.
simple answer is wrap your content in a div and centre that if you add apdive inside that then the reference point will be taken from the edge of that div not the body.
if you havea centred div now it will position in the centere while your apdive are positioning say 25 pixels fronm the left. 1 is changing dynamically as it were the other is a fixed value