Forum Moderators: not2easy
container (for centering)
-header
-columns
--left
--center
--right
-footer Can we do better than seven divs? Am I just reading tutorials that are out of date? What's the latest on fixed-width, centered designs?
[edited by: encyclo at 1:54 am (utc) on July 17, 2007]
Can we do better than seven divs? ... What's the latest on fixed-width, centered designs?
Technically, you only need one div for that -- the container itself. All the other divs you listed are optional, but may be included as extra blocks of divs depending on your particular design.
Regardless, even with the exact design you are indicating, you can get it down to six divs, as the outermost container is not needed.
But, hey -- six or seven elements isn't really that much. How many would you need for a table based layout? You could never ever get below three. And, for your particular design we are looking at a minimum of eleven elements.
[edited by: DrDoc at 4:28 pm (utc) on July 16, 2007]
All the other divs you listed are optional, but may be included as extra blocks of divs depending on your particular design.
Technically, you only need one div for that -- the container itself. All the other divs you listed are optional ... Regardless, even with the exact design you are indicating, you can get it down to six divs, as the outermost container is not needed.
Let's approach this problem from a different angle ... What if I centered the Header div with no special margins, centered the Content div with a large top margin to get it out of the way of the header, and centered the Navbar with a negative left margin to pull it away from the Content? What kinds of problems would that kind of design bring? It seems simple enough for me to waste hours rediscovering problems that have led others to believe a nested div structure is best ...
[edited by: encyclo at 1:53 am (utc) on July 17, 2007]
In my book, absolute anything (width, font-size etc) is for control freaks who, stereotypically, get the 80:20 rule backwards re content and style
I do write ids (in media="screen" files) with position:absolute; but I know full well that - esp for certain audiences - a relatively large percentage ('scuse the pun) of visitors will have CSS turned off
As a user, I visit sites to get information. If I want special effects, I'll watch a movie
...80:20 rule backwards re content and style
I see far too many of those. Lucky for us, some of them are our competitors :). One site in particular is about 600 wide, has that lovely flash intro every page change, and all the usual other stuff.
It is kind of funny, but one of the highest ranking pages on all our sites is also the ugliest and plain. I have upgraded and cleaned it up a bit and gotten rid of any bad code, but I am afraid to touch it much...
...a relatively large percentage ('scuse the pun) of visitors will have CSS turned off ...
<blush>
I did not even know you could turn CSS off...
[edited by: Wlauzon at 1:13 am (utc) on July 17, 2007]
..If I want special effects, I'll watch a movie
And even far too many movies are falling to that trap. Getting so that far too many movies now are nothing BUT fast moving poorly edited, with random flashes of light designed (I assume) to induce seizures.
I often wonder if the same people make websites for clueless corporations.
I did not even know you could turn CSS off
In Opera (you DO have Opera, at least for testing, don't you ;)) you can toggle between 'author' and 'user' mode (on a PC) via 'Shift + g'
And... under View \ Style there is a variety of 'modes' that can be applied individually or in combination and they can be real time saver when putting a page together
...it is probably just me, but I detest fixed width websites.
Personally, I have nothing against fixed width (or possibly max-width) sites. They have their place. Sometimes it's just not desirable to allow a very wide site, particulary if you have blocks of text.
90% of them seem designed for 640 or 800 width, which leaves about half my screen blank.
Hmmm, too much wasted space is a niggle - but the browser is just a window, there's no reason it should necessarily be full screen. If I'm on a large enough screen res then I will browse two windows side by side.