If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

div within a div

I have a parent div layer that has borders. On one of my pages the only thing inside this div is other divs. The sub-divs position themselves beautifully in relation to the parent div even with 'position:absolute' but because I'm using 'position:absolute' the parent isn't recognizing them or something and the border never expands to envelope them. I can't use 'position:relative' because there are sometimes 40 or more divs and when I use 'position:relative' they all get relative to each other and never end up in the right place.

Abs pos nightmare

An absolutely positioned element is taken out of the normal flow and hence won't have any influence on its parent; the outer div collapsing is the proper behaviour.

Without knowing what layout you wish to create it's near impossible to say anything conclusive, but judging by the term "layer" you're using DW to auto-generate an all abs pos based layout.
Better take the helm yourself and steer clear of DW's "table-cells-replaced-by-abs-pos'd-divs" layout nightmares; learn how to apply CSS positioning to create layouts yourself.

Absolute positioning has powerful possibilities, but should be used judiciously with a solid understanding of the implications of its use.

I tried the position:normal but it doesn't listen when I define the top and left elements. I read the article and realized I don't think I'm going to be able to do what I want the way I have in the past.

Originally Posted by ronaldb66

Better take the helm yourself and steer clear of DW's "table-cells-replaced-by-abs-pos'd-divs" layout nightmares; learn how to apply CSS positioning to create layouts yourself.

I do absolutely position certain elements of my layouts - I figure mostly because I'm a control freak. But not often as a replacement for table cells. Except in this case that's what I'm doing. I didn't include the code earlier because it's a nightmare reagardless of any positioning.

Example page

It would really help if you could make the page in question available online: without seeing the actual images and the sort of effect you wish to achieve, it's hard to suggest anything useful.
If you are unable or unwilling to expose the page online, at least make a screen capture of the section at hand so we can SEE it.