Forum Moderators: open

Message Too Old, No Replies

Liquid layout vs Fixed layout

What do you prefer - and why?

         

Nick_W

7:39 am on Oct 4, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi everyone,

I'm a big beleiver in the concept of liquid design but, I know many of you prefer to code to fixed width/font criteria.

I prefer the liquid approach because I think it allows your pages to adapt to whatever the user is using. That may be a 1024x768 high rez monitor on a PC or it maybe 800x600 with a whole bunch of toolbars further diminishing screen real estate.

Whatever the case, a liquid layout will adapt to it.

I'm sure some of you disagree, let's here your thoughts...

Nick

Nick_W

5:49 pm on Oct 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Say you have a 3 colunm layout with absolutely positioned divs.

#left
#content
#right

in your html flow it might run like this:

content
left
right

then at the bottom you put another div:

#footer

If you just put #footer last in the code flow it may well be overlapped by other div's because when you absolutly position something you take it out of the normal 'flow' of the document and place it.....absolutely!

So the footer get's overlapped as the footer runs in the 'normal' flow.

Remember, this only applies to absolutely postioned divs before the footer...

Nick

SethCall

9:37 pm on Oct 5, 2002 (gmt 0)

10+ Year Member



ahhhhhhhhhhhhhh Gotcha nick :)

of course you are right: i was assuming "liquid" layout.

(all relative positioned divs)

since we are on the topic of relative footers,

...

why is it that mozilla doesn't put in a scroll bar for relative positioned divs? As in, if a relative positined div goes off the bottom of the screen, no scroll bar comes up...
is there a way to fix this?

dingman

10:17 pm on Oct 5, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



overflow: scroll;

Unfortunately, this seems to put a vertical scrollbar on whether you need it or not.

SethCall

1:47 am on Oct 6, 2002 (gmt 0)

10+ Year Member



umm i believe overflow:auto is better... (no bar unless u need it)

but where were u suggesting it be? body? because I want the big scroll bar to show up

SethCall

1:57 am on Oct 6, 2002 (gmt 0)

10+ Year Member



well putting overflow:auto the divs in question did nothing for me.

Well my homepage is set to this page in question ... you can see for yourself if you open it in mozilla, and IE, that IE shows the bottom of the page (which is an applet) in its entirety, but Mozilla doesn't

yes the applet at the very bottom is very gimpy.. just click all over it... and you will get the color picking to work in it. If you scroll all the way down in IE, its obvious that IE is shwoing the bottom of the applet, but mozilla wont show it.

"strange"

dingman

4:15 am on Oct 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How about just setting height appropriately, and not using so much relative positioning. You don't need it to get a few horizontal regions of particular heights. I think what may be happening is that the relative positioning pushes stuff too far down, without pushing the edge of the page along with it.

That said, I'm hardly the CSS expert that some people around here are, so ymmv.

SuzyUK

11:01 am on Oct 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep Nick, thanks,

Floated content divs too
then a clear: both Footer div..

guess I'm a liquid layout person too then!

thanks for clarifying

Suzy

Kiffin

12:00 pm on Oct 6, 2002 (gmt 0)



As a pioneer in the new and challenging world of mobile telecom, one does not know ahead of time the display dimensions of various devices like mobile phones and/or pda's. So it is important to adhere to the liquid rules in order to make sure that your content will naturally flow into the limitations of the window available. I guess that means I am a liquid kind of guy...

Nick_W

12:33 pm on Oct 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've never really experimented with relative positioing, if you guys would like to sticky me some examples.... ;)

Nick

SethCall

5:12 am on Oct 7, 2002 (gmt 0)

10+ Year Member



what does "sticky me" some expamples mean?

Purple Martin

5:51 am on Oct 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



"sticky me" some examples means send some samples via sticky mail. To do this, click on the little mail icon on the left by Nick_W's name.



I prefer liquid pages. I think that most users won't notice that a page is liquid, but if it's fixed and not the same size as their window they'll notice that it doesn't "fit".

Mark_A

6:38 am on Oct 7, 2002 (gmt 0)

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



Hi Purple Martin, tell that to the BBC, it has to be one of the higher volume sites on the net and its fixed width at the lowest common denominator at the moment 640x480. :-)

It works pretty well too.

NeoN

6:49 am on Oct 7, 2002 (gmt 0)

10+ Year Member



Unfortunately, some of my clients insist on fixed size! I love liquid design.. But I do not understand why they love a fixed size.

Also, could anybody show me a site ( GREAT SITE) that is totally controled by CSS? I mean, the whole layout.

Thanks!

sparrow

1:42 pm on Oct 7, 2002 (gmt 0)

10+ Year Member



Hello again everyone, it's been a while.

I'm working an some liquid layouts for a couple of sites. I've noticed that I've had to build 3 stylesheets; 1 for IE, 1 for NN and 1 for Opera, in order for the pages to position correctly.

Did I miss something somewhere that would enable me to create only one and have it work for all 3 browsers?

Secondly I am using a 3 column format with a header and footer. I've noticed that I have to use <br>'s in order to ensure that the #footer appears far enough below the #content. Is there a way to get around that?

Thanks.

Nick_W

1:50 pm on Oct 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



r the brHi Sparrow,

You'll never get the 3 column to work in NN4 aswell as all the more modern browsers but there is no reason why you'd need seperate sheets for IE and Opera.

I use 3 column CSS layouts all the time and only ever build one sheet, wiht additional sheets for importing for specific sections of a site...

As for the <br />'s on your #footer, there's a far more elegant solution:


[pre]
#footer {
margin-top: 10em;
}
[/pre]

Nick

sparrow

2:12 pm on Oct 7, 2002 (gmt 0)

10+ Year Member



Thanks Nick_W

IMO, I thought NN was displaying the page better then IE and OP. It seemed to fit the content to page better. Also the margins between the text appeared "neater", but maybe it's just my eyes.

I'll try the "em" idea.

Oh by the way has anyway tried NN7, we brought the page up and NN7 and
it was BAD, really BAD. I was just wonder if anyone else has tried NN7?

Nick_W

2:20 pm on Oct 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, but Moz 1.0 is the same I beleive, ther must be something you are doing different to me as I don't have a problem with these differences...

Maybe my designs are simpler though, I'm a simple kinda guy (according to Mrs Nick_W ;))

Important note:

We've talked alot about liquid CSS layouts but no one has mentioned that the liquid concept can be implemented with <shudder>TABLES</shudder>....

Liquid layout just means, well, fluid layout. It doesn't neccessarily mean CSS

Nick

sparrow

2:24 pm on Oct 7, 2002 (gmt 0)

10+ Year Member



Hey Nick_W,

Using em, did the trick, now I wonder if I change the attributes on the margins for the #content and #right to em, if that will fix the
problem of having 3 style sheets? What do you think?

Thanks

Nick_W

2:29 pm on Oct 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, I think the best advice is to not have margins on the columns. If they are absolutely positioned what need for margins?

Nick

dingman

2:32 pm on Oct 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've got NN7, Moz1.1, Moz1.2a, Phoenix, Opera6, and IE6 on my work machine. Usually, I don't see a difference between the first 4 (what a shock, they all use Gecko, even if slightly different versions) and my preference for how they render tends to be (1) the Gecko crew (2) Opera, and (3) IE6. I'd be curious to see code that looked good in IE and really bad in Gecko, as all I've ever written was the reverse. Usually, though, I can make Gecko and IE rendering simillar enough that I have to compare them side-by-side on the screen to notice the difference without changing much. It may be worth noting, though, that I have never knowingly put a non-standard tag or attribute in my (X)HTML, nor a non-standard object in my Ecmascript. I do still have layout tables, though I'm learning to do without them.

sparrow

2:34 pm on Oct 7, 2002 (gmt 0)

10+ Year Member



Nick_W, I just stick mailed you my MSIE sheet.

Eric_Jarvis

2:35 pm on Oct 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I tend to go back to first principles whenever I'm faced with something overly complicated...so to get designs to work cross browser I choose the units to work as units, and the browsers seem to "understand"

em I use when I'm relating spacing (margins, padding etc) to the text...it doesn't matter then how they interpret it, it'll be fairly similar

% I use for large scale stuff that relates to overall page size and for scaling fonts up and down for emphasis...as long as one looks out for inherited scaling, then this seems to generally be OK

px has a place only when relating something to a fixed image...or to do extremely thin borders

CAVEAT: I've largely avoided all use of absolute positioning...which is apparently one of the things that can get really messy

Nick_W

2:43 pm on Oct 7, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, here's my standard 'bare bones' 3 col layout:

[pre]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "xhtml11.dtd">
<?xml version="1.0" encoding="iso-8859-1"?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Bare bones 3 column CSS layout</title>
<style type="text/css">
#leftpanel {
position: absolute;
top: 140px; /* resize these bits to liking */
left: 0;
width: 200px; /* works best with fixed width right - left divs*/
}

#rightpanel {
position: absolute;
top: 140px; /* resize these bits to liking */
right: 0;
width: 200px; /* works best with fixed width right - left divs*/
}

#content {
position: absolute;
top: 140px;
padding-left: 220px; /* 20px to play with */
padding-right: 220px; /* 20px to play with */
}
</style>
</head>
<body>
<h1>Bare bones 3 column CSS layout</h1>


<!-- Content here -->
<div id="content">
<p>You can put your content here, under the space for a header, or
you can re-arrange the divs in the html to put your right or left
column first.</p>
</div>

<!-- Right column here -->
<div id="rightpanel">
<p>This is a good place to pop nice optimized text into, especially
if your #content div is full of images and little text. I like to
put an 'editors note' here: Just an excuse to squeeze optimized
copy into the html flow without bothering the user ;-)</p>

</div>

<!-- Left navigation etc -->
<div id="leftpanel">
<p>Links, come last, presuming your 'header' has a 'main sections'
navigation with regular text links this is just fine for SE's and
magic for optimization.</p>
</div>
</body>
</html>
[/pre]

You'll see the diferences immediately I think, this, once 'prettified' holds up very well acroos damn near anything except NN4....

Nick

bobince

10:16 pm on Oct 7, 2002 (gmt 0)

10+ Year Member



NeoN wrote:

Also, could anybody show me a site ( GREAT SITE) that is totally controled by CSS? I mean, the whole layout.

I don't know about GREAT, but my SITE <see profile> is totally CSS and liquid. I really love the idea of CSS for layout and use it for most new projects, though I have to say not all types of layout are achievable with CSS-P: where you have a mixture of liquid (browser-size-dependent), amount-of-text-dependent and fixed-pixel measurements together things can get very hairy.

sparrow wrote:

Did I miss something somewhere that would enable me to create only one and have it work for all 3 browsers?

It is possible to hide rules from different browsers within a stylesheet. The two main reasons for this are (a) to hide problematic styles from Evil Netscape 4, and (b) to fix the Box Model bug in IE5/Win. Though personally I prefer to avoid the Box Model bug by avoiding specifying a 'width' on the same element as a 'padding' or 'border' (except in the cases where a few pixels either way doesn't matter anyway).

How to hide a rule from N4, taking advantage of an N4 bug in comment parsing ("The Caio hack"):


/*/*/ selector { properties } /* not N4 */

How to make a rule for N4 only (my reversal of Caio's hack):


/*/*/ /*/ selector { properties } /* N4 */

How to get around the Box Model bug ("Simplified Box Model Hack"):


selector { padding: 50px; }

selector { width: 500px; } /*/*/
selector { width: 400px; }
selector { \width: 500px; }
selector { w\idth: 400px; } /* */

(The first 'width' in this is for N4, the second for Opera 5 and any other browser that does not
understand backslash escapes, the third for IE5/Win, the last for Standards browsers (IE/Mac,
Mozilla, Opera, Konqueror).

I don't know what's up with your site, but generally speaking Mozilla/Netscape 7 has the
most accurate rendering of any browser.

BTW the script that makes min-width and co. work on IE/Win can be
found at <sorry, no personal URLs> Setting
a width in %, with min- and max-widths in 'em' can be very effective.

[edited by: tedster at 4:17 pm (utc) on Oct. 8, 2002]

sanity

7:51 am on Oct 8, 2002 (gmt 0)

10+ Year Member



However, people with very high rez monitors normally resize the window to a more 800x600 looking size. I don't have any hard data to back this up but I've heard it from many reliable sources over the last couple of years and have seen it first hand on more than one occasion.

Yep I do it and I'm currently on 1024x768. Many people I deal with browse the same way.

Dave2

9:24 pm on Oct 8, 2002 (gmt 0)

10+ Year Member



However, people with very high rez monitors normally resize the window to a more 800x600 looking size. I don't have any hard data to back this up but I've heard it from many reliable sources over the last couple of years and have seen it first hand on more than one occasion.

I - personally - browse with my window full open... I did this even when I was at 1600x1200. It seems, however, that I'm in the minority. I still prefer liquid designs though.

SethCall

10:07 pm on Oct 8, 2002 (gmt 0)

10+ Year Member



i browse in 1024 * 768 ... i can't stand to see pages in 800*600.

Mark_A

5:59 am on Oct 9, 2002 (gmt 0)

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



Erm, well as I am getting notifications about this thread I guess I had better add this ..

It matters not a bit if / how you web designers browse sites .. it only matters how the target clients of the site will / do browse them ..

An issue I think should be added is size of clickable navigation elements

.. assuming they are text based and are allowed to resize with other text this issue can be reduced I think but the difference in the physical size of a pixel (in actual mm or Inches) between the largest screen res and smallest seems to be getting greater which means the challenge is also increasing. Acrobat documents resize all elements which is great for their applications but html does not.

For those editing images and wanting good results, try optimising an image in a 1600x screen then looking at the output file in 640x480 I guarantee it wont look as clean ..

stuntdubl

5:05 pm on Oct 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a serious css quandry. I am fairly new to css and use DW to do most of my coding. I am trying to ditch all the tables in my sites to serve the search spiders more of the 'meat' of my site. Anyhow.....
The layout that I am trying to achieve with css is this:
<top div>50 px top banner that spans 100% width
<nav div>150 px nav bar that spans 100% height
<content div>*,* px for editable region/ content for the remaining space in the browser window
to resize with different resolutions, and scroll with the 'auto overflow' function of css.....
I am boggled how to tell the browser....'use the remaining space'

With tables there is a * identifier to convey this....

I thought possibly telling the <nav div> to use 100% width, but this seems to only tell it to use 100% + 150 px.

Do I use absolute? relative?

Any insight would be greatly appreciated.

Nick_W

5:41 pm on Oct 9, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check msg #53

You can adapt that layout very well to what you need ;)

Nick

This 84 message thread spans 3 pages: 84