Results 1 to 24 of 24
Feb 16, 2012, 09:10 #1
- Join Date
- Feb 2012
- 0 Post(s)
- 0 Thread(s)
DIV Absolute Positioning Relative To Wrapper DIV?
I hope someone maybe able to help me with a CSS question!
I'm currently trying to create a website layout in CSS. I'm struggling to understand relative and absolute positioning and a couple of other things.
This is a draft of my website: http://www.unitedkerrydom.co.uk/index2.html
As you can see, I have the margins set to auto so it floats in the centre of the browser. I would like to have DIVs contained within my wrapper DIV that float relative to wrapper (not the browser window). When I set the wrapper DIV positioning to relative and the DIV I want floating relative to it with the 'absolute' positioning in place, the page breaks, and the content DIV won't extend, when I need it to for the content (which will vary in length). Why is this?
Also, I have to float the content DIV left or the page breaks. I don't understand why this is, or why float left works?
I've changed the design and what I want to do, is have various DIVs floating in absolute positions within the wrapper DIV. Does anyone know how I can do this?
All help appreciated. Many thanks in advance.