I have a problem that seems to be reoccuring throughout the development of a site I am working on.
This is the first time I have gone for a pure CSS layout, and as such I am finding out how difficult it is to generate a one-size-fits-all css.
Anyway...the problem is this.
I have various divs, that are absolutely postioned, and within them I have other relative / absolute divs. The main div has a border around it, and holds all other divs, but it doesnt recognise that there is content below it on some occations, and just finishes in a location half way through the content.
So, for example.
I have a whole load of divs postioned relative to the main content div that produce the header, most of which are absolute (taking advantage of the fact that you can absolutely position relative to the parent object if it has a top and a left value defined). When I then go to put some text in after the header, it comes out at the top of the content div, on top of the header itself. IE: The content div isnt recognising the child divs as objects within as they have been defined as absolute i guess, and just carries on in the next place availible.
The only solution I have found is to insert a load of <br> statements that make the content below the header come out in the right place.
I have having the same problem with a nested float, later in the page.
I have a div which is bordered, and I want to float a menu on the left of the div, so I can put the other content to the right. The problem is the div finishes where the bottom of the other content, and not at the bottom of the nested/floated menu, which is bigger.
How do I deal with these kinds of problems to get things to go where they should?
I have played with many things, including the display property, which worked for some browsers by setting it to table, but not for others. Surely you should be able to nest absolute or floated elements and have the parent recognise that they are children?
take a look at:
A template i'm working on....
...for an idea of what im talking about.
Thanks for your time in advance.