Forum Moderators: open
I've got some nice layouts working now, columns, columns within columns etc, with some standardised code that can easily be ported to other sites without modification.
My question is, how many nested DIVs for positioning is acceptable?
Immediately after my <body> I have 2 as the page has a shadow, so an inner and outer required for that. Then my content is a further 2 deep, one container and one column. I think that's ok.
But within that column, I have 2 columns with centered content. So another container, column, and an extra one for centering the whole content. Now up to 7. Thinking this is a little too far?
Sometimes you can actually cut it short. For example if you want a "boxy" link you don't need to wrap the a tag in div, you can just add a class to your a tag and set its display mode to "block" : )
Just an example that I figured back when I was almost a year in CSS, lol.
Enjoy, CSS rules : )
Header
C1 C2
Footer
is traditional
Header
Ad Ad Ad
C1 C2
Ad Ad Ad
Footer
also works.
Four/Five seems to be the magic number (divs). My ads appear in the same div(s). KISS method. HOWEVER, nothing is etched in stone and "max" divs has not yet been tested in the real world so going for more is not a bad thing...just a thing that takes extra work.