473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Liquid design question

oj
Please, bare with me. I'm new to CSS and would like to ask for some
advice on my current project. I have an existing table based layout
that serves as the main template for a .Net application I've been
working with. I would like to convert this layout to css based liquid
design. I would like the pages to stretch both horizontally and
vertically as needed. The layout needs to consist of a Pre-Header area
that stretches across the entire page. The header area follows also
stretched across the entire page. An area for bread crumbs follows
strectched across the entire page. Beneath these three bars I would
like a nav. area to the left with a width of approx. 30% of the page
and height that fills the remainder of the page. To the right of the
nav. area should be my content area with a width that stretches across
the rest of the page and a height that stretches almost the rest of
the page but leaves room for a footer area underneath and to the right
of the nav. area. All the areas should flow together with no gutter
areas in between. Any information on to best improve and achieve a
liquid design is appreciated. It seems this design would be fairly
trivial using tables, but it also seems there should be a better way
to do it using css. Here is my current style sheet:
body{
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
font-family:Georgia;
height:100%;
}

div.PreHeaderArea{
background-color:#330099;
color:#FFFF00;
margin:0px;
height:1%;
z-index:6;
}
..ParentSiteTitle{
font-weight:bold;
font-size:10px;
color:#FFFF00;
}
..SiteNavLink{
FONT-SIZE: 10px;
color:#FFFF00;
TEXT-DECORATION: underline;
}

div.HeaderArea{
background-color:#FFFF00;
color:#330099;
margin:0;
height:6%;
top:1%
z-index:4;
}
..SiteTitle{ FONT-SIZE: 25px;}
div.BreadCrumbArea{
background-color:#330099;
color:#FFFF00;
margin:0;
height:3%;
top:7%
z-index:5;
}
..BreadCrumbText{
font-size:10px;
font-weight:bold;
color:#FFFF00;
}
div.NavigationArea{
float:left;
background-color:#330099;
color:#FFFF00;
width:25%;
height:80%;
top:10%;
z-index:6;
}
div.ContentArea{
background-color:silver;
float:right;
left:25%;
top: 10%;
height:77%;
width:75%;
z-index:8;

}
div.FooterArea{
background-color:#FFFF00;
float:left;
width:75%;
height:3%;
left:25%;
top:90%;
z-index:2;
}
Jul 21 '05 #1
8 2037
On 22 Nov 2004 16:17:38 -0800, oj <oa*******@yahoo.com> wrote:
Please, bare with me.
Ooh, exciting! Though you probably mean "bear with me". "Bare with me"
means we both get naked.
... The layout needs to consist of a Pre-Header area
that stretches across the entire page. The header area follows also
stretched across the entire page. An area for bread crumbs follows
strectched across the entire page. Beneath these three bars I would
like a nav. area to the left with a width of approx. 30% of the page
and height that fills the remainder of the page. To the right of the
nav. area should be my content area with a width that stretches across
the rest of the page and a height that stretches almost the rest of
the page but leaves room for a footer area underneath and to the right
of the nav. area. All the areas should flow together with no gutter
areas in between.


For future reference, this is so much easier with an uploaded example and
a posted URL.

Basically, to have a footer you must float the columnar material above and
set the footer as clear: both;.

After your full-width material, and assuming you want the content before
the column in the code:

..content {float: right; width: 69%;}
..nav {float: left; width: 30%;}
..footer {clear: both;}

This should get you started. To eliminate gutter space, control margins
and padding in the CSS.

More questions? Ask.
Jul 21 '05 #2
On Mon, 22 Nov 2004 19:49:43 -0500, Neal wrote:
Please, bare with me.


Ooh, exciting! Though you probably mean "bear with me". "Bare with me"
means we both get naked.


Sorry for taking this *so* off topic, but that reminded me of some
common graffiti editing done to a sign on Sydney's urban trains..

"At night, travel near the guard's compartment, marked with a blue light"

becomes..

"At night, rave near the gi rl's compartment, na ked with a blue light"

I'd probably give it a go, ..if I could find the girl's compartment. ;-)

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
Jul 21 '05 #3
oj
Neal <ne*****@yahoo.com> wrote in message news:<op**************@news.individual.net>...
On 22 Nov 2004 16:17:38 -0800, oj <oa*******@yahoo.com> wrote:
Please, bare with me.
Ooh, exciting! Though you probably mean "bear with me". "Bare with me"
means we both get naked.


Aah yes, you are correct I do not wish to get naked! :)
For future reference, this is so much easier with an uploaded example and
a posted URL.
I'm working on this via my work server. Any recommendations on a free
site to store a web page for viewing without having a bunch of
advertising banners on the page as well.

.content {float: right; width: 69%;}
.nav {float: left; width: 30%;}
.footer {clear: both;}


Do I insert your recommended property values in addition to the ones
already defined in my stylesheet? Also, when I view the page on my
laptop it looks almost right, but when I view the page on my company's
test webserver it looks far from perfect. Both use IE 6.0.
Jul 21 '05 #4
oj
Andrew Thompson <Se********@www.invalid> wrote in message > Sorry for taking this *so* off topic, but that reminded me of some
common graffiti editing done to a sign on Sydney's urban trains..

"At night, travel near the guard's compartment, marked with a blue light"

becomes..

"At night, rave near the gi rl's compartment, na ked with a blue light"

I'd probably give it a go, ..if I could find the girl's compartment. ;-)


You have way too much time on your hands. :)
Jul 21 '05 #5

"oj" <oa*******@yahoo.com> wrote in message
news:ab**************************@posting.google.c om...
Please, bare with me. I'm new to CSS and would like to ask for some
advice on my current project. I have an existing table based layout
that serves as the main template for a .Net application I've been
working with. I would like to convert this layout to css based liquid
design. I would like the pages to stretch both horizontally and
vertically as needed. The layout needs to consist of a Pre-Header area
that stretches across the entire page. The header area follows also
stretched across the entire page. An area for bread crumbs follows
strectched across the entire page. Beneath these three bars I would
like a nav. area to the left with a width of approx. 30% of the page
and height that fills the remainder of the page. To the right of the
nav. area should be my content area with a width that stretches across
the rest of the page and a height that stretches almost the rest of
the page but leaves room for a footer area underneath and to the right
of the nav. area. All the areas should flow together with no gutter
areas in between. Any information on to best improve and achieve a
liquid design is appreciated. It seems this design would be fairly
trivial using tables, but it also seems there should be a better way
to do it using css. Here is my current style sheet:
body{
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
font-family:Georgia;
height:100%;
}

div.PreHeaderArea{
background-color:#330099;
color:#FFFF00;
margin:0px;
height:1%;
z-index:6;
}
.ParentSiteTitle{
font-weight:bold;
font-size:10px;
color:#FFFF00;
}
.SiteNavLink{
FONT-SIZE: 10px;
color:#FFFF00;
TEXT-DECORATION: underline;
}

div.HeaderArea{
background-color:#FFFF00;
color:#330099;
margin:0;
height:6%;
top:1%
z-index:4;
}
.SiteTitle{ FONT-SIZE: 25px;}
div.BreadCrumbArea{
background-color:#330099;
color:#FFFF00;
margin:0;
height:3%;
top:7%
z-index:5;
}
.BreadCrumbText{
font-size:10px;
font-weight:bold;
color:#FFFF00;
}
div.NavigationArea{
float:left;
background-color:#330099;
color:#FFFF00;
width:25%;
height:80%;
top:10%;
z-index:6;
}
div.ContentArea{
background-color:silver;
float:right;
left:25%;
top: 10%;
height:77%;
width:75%;
z-index:8;

}
div.FooterArea{
background-color:#FFFF00;
float:left;
width:75%;
height:3%;
left:25%;
top:90%;
z-index:2;
}


I just put everything inside a container.

#container
{
width: 90%;
margin: 10px auto;
background-color: #fff;
color: #333;
border: 1px solid gray;
line-height: 130%;
}
Jul 21 '05 #6
On Mon, 22 Nov 2004 16:17:38 -0800, oj wrote:
Lots of code and stuff snipped


Here are two good references that can be hacked to do what you want:

This link talks about creating liquid designs with negative margins.
http://www.alistapart.com/articles/negativemargins/

This link talks about fake columns.
http://www.alistapart.com/articles/fauxcolumns/

Both of these ideas are useful. For each area on your page, you can
contain a 2 or three column liquid design in a <div></div>. Then you just
stack the results in the order that you would like.

I've not been as happy with the three column effect as I have with the
two column layout. However, I can get around that with some games played
with absolute positioning for now.

Other approaches that seem to work well can be found in Chapter 7 of the
book CSS Cookbook by Christopher Schmitt (O'Reilly). Some slight hacking
about is needed for these solutions, especially to deal with the many
broken parts of Internet Explorer.

To fix the layout in Internet Explorer, you'll need to see some box model
hacks:

http://webdesign.about.com/cs/css/a/aaboxmodelhack.htm
http://positioniseverything.net/expl...reepxtest.html

Armed with the above information you should be able to construct
cross-browser layouts that actually look consistent.

Hope this helps

/mde/
just my two cents . . .
Jul 21 '05 #7
On Tue, 23 Nov 2004, Mark Eggers wrote:

[...]
Armed with the above information you should be able to construct
cross-browser layouts that actually look consistent.


Which seems to me to be a fatuous waste of time, since none of your
*real* users are going to compare your web site in two different
browsers and award points for consistency.

If your lords and masters set visual consistency as a design
requirement, then they're wasting their own money, so go ahead and
grab as much of it as you can. But if I'm honest, I would try to
explain to them why I reckon that they're wrong. One of the original
*intentions* of the WWW was to display the same information in very
diverse situations - there is simply no reason that it has to look the
same, and lots of reasons for it to look different.

In fact as comparing two very different browsing situations I'm sure
that I would *like* the results to be inconsistent with each other,
but optimally usable in each.

So I'd say make it look good in a specification-conforming browser in
the usual range of visual settings; and make sure that it's at least
usable in any other kind of browsing situation. Optimise to taste,
but *don't* aim for pointless consistency.
Jul 21 '05 #8
oj wrote:
Neal wrote
.content {float: right; width: 69%;}
.nav {float: left; width: 30%;}
.footer {clear: both;}


Do I insert your recommended property values in addition to the ones
already defined in my stylesheet? Also, when I view the page on my
laptop it looks almost right, but when I view the page on my company's
test webserver it looks far from perfect. Both use IE 6.0.


I was trying to avoid critiquing the stylesheet... oh well, here goes.

body{
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
font-family:Georgia;
height:100%;
}

- No need for a unit on 0 values.
- In font-family, setting just Georgia means the user's default font -
whatever it may be - will be used if Georgia is not installed. If you set
a font, it's probably a good idea to end with a generic - serif or
sans-serif, depending on what you're after look-wise.

div.PreHeaderArea{
background-color:#330099;
color:#FFFF00;
margin:0px;
height:1%;
z-index:6;
}

- Without knowing the content of this div, I cannot comment on whether
height: 1% is appropriate. I highly doubt it is.
- z-index should not need to be used if you do it right. z-index simply
tells the browser how to handle overlaps. The goal, however, is to have no
overlaps.
- Though, good that you set both color and background-color. You might
consider setting body with these too, in the event some elements don't
meet neatly.

..ParentSiteTitle{
font-weight:bold;
font-size:10px;
color:#FFFF00;
}

- background-color?
- px is not a suitable unit for text on the web. Use % or em, they are the
only units that will work properly - that is, they will resize so the user
can read your page, while px (and pt) cannot resize in all UAs.

..SiteNavLink{
FONT-SIZE: 10px;
color:#FFFF00;
TEXT-DECORATION: underline;
}

- Though case is not critical, mixing case is sloppy coding. This isn't an
error though.
- Links will be underlined anyhow, this last declaration is not needed.

div.HeaderArea{
background-color:#FFFF00;
color:#330099;
margin:0;
height:6%;
top:1%
z-index:4;
}

- More of the same as above.

..SiteTitle{ FONT-SIZE: 25px;}

- No, no, no...

div.BreadCrumbArea{
background-color:#330099;
color:#FFFF00;
margin:0;
height:3%;
top:7%
z-index:5;
}

- See above.

..BreadCrumbText{
font-size:10px;
font-weight:bold;
color:#FFFF00;
}

- Again.

div.NavigationArea{
float:left;
background-color:#330099;
color:#FFFF00;
width:25%;
height:80%;
top:10%;
z-index:6;
}

- top: is only meaningful when you set the property position. Floating is
NOT the same as position.

div.ContentArea{
background-color:silver;
float:right;
left:25%;
top: 10%;
height:77%;
width:75%;
z-index:8;

}

- You've been doing hex color, and now you use a name. Not incorrect, but
it's inconsistent.
- Again, top is not used with float.

div.FooterArea{
background-color:#FFFF00;
float:left;
width:75%;
height:3%;
left:25%;
top:90%;
z-index:2;
}

- Don't float this. Instead, use clear: both; and the div will drop below
both content and column.
- Again, the "top" and "left" are meaningless. What it looks like you want
is the div content to start 25% across the page, right? If so,
margin-left: 25%; does the trick nicely. No need to specify width now, as
it will be the remainder of the viewport.

Hope this clears up any problems. If I were you, I'd (temporarily) dump
the z-index, all the tops and lefts etc., change that footer to clear, and
use % and/or ems for font-sizes.
Jul 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: kayodeok | last post by:
Found during my web travels: Liquid Layouts: The Easy Way http://www.maxdesign.com.au/presentation/liquid/ Posted here for you to pick apart ;) -- Kayode Okeyode...
5
by: Charles Blaquière | last post by:
As part of my explorations in liquid design, I'm exploring ways to use the overflow: hidden property -- when browser windows become too narrow, I want (some) images to get cropped rather than have...
3
by: SebiF | last post by:
Hello, It might have been asked before but since I could not find a reference here's my qustion: I want a liquid layout similar to this one:...
5
michaelea
by: michaelea | last post by:
Hi, new newbie here..to liquid styles anyways... I'm not quite sure how to state my question properly but I'm hoping someone can help me please. How do I place a liquid Div inside a liquid...
4
by: ge5talt | last post by:
Longtime reader, 1st time poster :) I am in the process of overhauling a website and replacing an old table-based quirksmode layout with a standards-mode tableless one. I am currently working on...
9
by: Eric Lindsay | last post by:
How do you provide a consistent gradient fill as a background in a liquid layout? If I make a gradient fill image say 1000 pixels wide (and repeat it down the page) to suit a typical computer...
0
by: announcements | last post by:
Liquid Technologies Announces Availability of Liquid XML 2008 (v6.1) New features include: - New Code Generation for C# and VB .Net (2005 and 2008) utilizing Attributed classes with Generic...
15
by: Eric Lindsay | last post by:
I need to include some simple (sparkline style) graphs in a web page that will have a liquid layout. Some viewers will be changing the font size to suit their display (sizes range from 320 to 2560...
3
chathura86
by: chathura86 | last post by:
hi, i want to have tow column in my design (divide the page in to two parts) where i want left column to be liquid while the right column has the width of 200px so when the window re size only...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.