Forum Moderators: not2easy

Message Too Old, No Replies

What's the latest on fixed-width designs?

hopefully, less container divs, cleaner solutions

         

martinship

9:28 am on Jul 16, 2007 (gmt 0)

10+ Year Member



After coding several variable width designs using only obviously-needed container divs for header, navbar, and content, I'm not too pleased to see tutorials on centered, fixed-width designs that incorporate this sort of div structure:

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]

DrDoc

4:23 pm on Jul 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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]

martinship

10:41 pm on Jul 16, 2007 (gmt 0)

10+ Year Member



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.

All the other divs you listed are optional, but may be included as extra blocks of divs depending on your particular design.

The structure I'm showing is near the minimum required structure for the layout. If you have more than one column, then a footer is required to make sure the columns reach all the way to the bottom and align properly or so I've been led to believe.

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.

I'm confused here. That CSS design site example I was linking to seems to be of the opinion that the container is the only thing that centering should properly be applied to.

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]

DrDoc

11:09 pm on Jul 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A nested div structure is much easier, yes. But it is not required. And that's what you asked. :)
So, six is the minimum with the layout you have in mind.

Wlauzon

11:14 pm on Jul 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it is probably just me, but I detest fixed width websites.

90% of them seem designed for 640 or 800 width, which leaves about half my screen blank.

DrDoc

11:47 pm on Jul 16, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, the layout above is not fixed width, so that should be fine :)

lavazza

11:55 pm on Jul 16, 2007 (gmt 0)

10+ Year Member



Wlauzon, you're not alone!

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

Wlauzon

1:09 am on Jul 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...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]

Wlauzon

1:16 am on Jul 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



..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.

lavazza

1:28 am on Jul 17, 2007 (gmt 0)

10+ Year Member



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

Wlauzon

7:20 am on Jul 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually no I don't have it on this computer.

Had it on the old one for testing but been too lazy to add to this one.

I don't have Netscape either, and probably never will...

penders

12:20 pm on Jul 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



...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.