PDA

View Full Version : I want divs like dodgems...


stevenradams
07-04-2009, 10:51 PM
Hi everyone,

I have what I hope is a quick question about divs. I'm learning and teaching myself and studying hard, but one thing I've not cracked about div positioning yet is how to stop them overlapping when the browser window is resized. How do I just make them 'bump' into each other and then stop... does this make sense?

I've tried numerous combinations of 'clear', 'padding' and 'margin' settings, but with no joy. Any advice graaaaaatefully received.

ttfn, S

Corrosive
07-05-2009, 11:53 AM
Hi everyone,

I have what I hope is a quick question about divs. I'm learning and teaching myself and studying hard, but one thing I've not cracked about div positioning yet is how to stop them overlapping when the browser window is resized. How do I just make them 'bump' into each other and then stop... does this make sense?

I've tried numerous combinations of 'clear', 'padding' and 'margin' settings, but with no joy. Any advice graaaaaatefully received.

ttfn, S

Use relative positioning and the divs will effect each other when they move or expand. I would always recommend relative over absolute positioning for site structure and would use 'layers' or 'APdivs' (depending on vers of DW you have) very carefully.

Hope this helps

stevenradams
07-05-2009, 12:06 PM
It does many thanks. I'm working from CS4, and am enjoying the curve, but there is definitely a learning curve (from graphic to web design...)!

Corrosive
07-05-2009, 12:09 PM
It does many thanks. I'm working from CS4, and am enjoying the curve, but there is definitely a learning curve (from graphic to web design...)!

Yeah, it is a steep curve but hang on in there, you will enjoy it :)

stevenradams
07-05-2009, 12:15 PM
:) thanks corrosive... I used to love coding as a child (in the dusty old days of vbasic) and gave it up for whatever reason. Getting into web design has reminded me why I used to love it so much then!