A Complex System That Works...

A

Arondelle

.... Is invariably found to have evolved from a simple system that works.
Remember when HTML was simple? Remember when you didn't have to have
advanced degrees in Computer Science and Quantum Physics to write a web
page? I don't....

I have been trying for days to produce a page that has a header across
the top, a sidebar menu in left column, content in a right column, and a
footer across the bottom -- all without using the dreaded (but simple to
use) table. All of my efforts so far have been less than satifactory.

I went to the W3C's CSS reference online, and copied the following
snippet. The diagram that accompanied the snippit showed a "page" that
was exactly what I wanted:

/*
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML>
<HEAD>
<TITLE>A frame document with CSS 2.1</TITLE>
<STYLE type="text/css">
BODY { height: 8.5in } /* Required for percentage heights below */
#header {
position: fixed;
width: 100%;
height: 15%;
top: 0;
right: 0;
bottom: auto;
left: 0;
}
#sidebar {
position: fixed;
width: 10em;
height: auto;
top: 15%;
right: auto;
bottom: 100px;
left: 0;
}
#main {
position: fixed;
width: auto;
height: auto;
top: 15%;
right: 0;
bottom: 100px;
left: 10em;
}
#footer {
position: fixed;
width: 100%;
height: 100px;
top: auto;
right: 0;
bottom: 0;
left: 0;
}
</STYLE>
</HEAD>
<BODY>
<DIV id="header">Header Text</DIV>
<DIV id="sidebar">
Sidebar Text<br>
Sidebar Text<br>
Sidebar Text<br>
Sidebar Text<br>
</DIV>
<DIV id="main">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam
erat volutpat. Nulla ac purus at justo tincidunt semper. Proin
adipiscing. Nullam at mauris. Fusce at quam. Pellentesque habitant morbi
tristique senectus et netus et malesuada fames ac turpis egestas.
Aliquam erat volutpat. Morbi at nunc ut ligula rutrum malesuada.
Pellentesque varius est sed purus. Ut diam lacus, mattis nec, accumsan
ac, pulvinar eu, eros. Cras ipsum. Aliquam augue.</p>
</DIV>
<DIV id="footer">Footer Text</DIV>
</BODY>
</HTML>
*/

I added some "content", saved it as an HTML document, and opened in my
favorite browser.

It entirely *failed* to produce anything even faintly resembling the
diagram on the CSS Reference. At least, it doesn't in IE. Maybe it
does in some obscure browser that only 3 people (in the W3C) use, but
that doesn't do much good for all those lazy people who use IE. :-/

What is the problem here?

::grumble::

Arondelle, the Grouchy Uber-Bitch
--
===========================================================
To email me, empty the pond with a net

"Don't try to out-weird ME, three-eyes: I get stranger things than you
with my breakfast cereal."
-- Zaphod Beeblebrox
 
T

Toby A Inkster

Arondelle said:
Remember when HTML was simple?

It still is. And if you use a Strict version it's even simpler. Your
problems seem to stem from CSS, which is a bit more complicated, though
still pretty easy if you don't try to push browsers beyond their limits.
CSS 2.1 won't work in IE -- IE only supports CSS 1.0 (and a bit of CSS 2.0).
 
D

Davmagic .Com

From: (e-mail address removed) >(Arondelle)
I have been trying for days to produce a >page that has a header across
the top, a >sidebar menu in left column, content in a >right column, and
a footer across the >bottom -- all without using the dreaded >(but
simple to use) table.

Why "dreaded"? Use em if their simpler...

See the example templates here: http://davmagic.com/PAGES49.html

Web Design should be "simple" if it's not, then you are doing something
wrong or unnecessary...

Web Design, Magic, Painting, Junking, More
http://www.davmagic.com
Paint A House
http://www.paintahouse.com
NOTE: This emailbox is CLOSED do NOT reply!!!
 
B

brucie

in post: <
Arondelle said:
Eat my shorts. :-X

i recommend drugs with a mellowing effect.
Well, that's pretty.

i picked the colors myself, mommy didn't help at all!
Will it explode if I start formatting the text and
putting stange objects in the DIV's?

it shouldn't do, its reasonably flexible. just do your normal assembling
a page thingy keeping an eye on margins/padding/widths etc and you
should be fine.
 
W

Wÿrm

Well, that's pretty. Will it explode if I start formatting the text and
putting stange objects in the DIV's?

might need

#footer{clear:both;}

if your side menu is very tall compared to content. Didn't check/test that
though, just took quick peek in code so I might be wrong.
 
B

brucie

in post: <
Wÿrm said:
might need
#footer{clear:both;}
if your side menu is very tall compared to content.

true

depending on the design you may also want to change "border-left:15ex
solid;" to "margin-left:15ex;" to avoid a bug with IE text resizing.
 
B

brucie

in post: <
PW said:
What if I want the content to be scrollable whilst leaving the menu static,
as I do here ... http://www.usaus.org

add position:fixed; to the #menu css. the menu <div> will remain in
place while the rest of the page scrolls. position:fixed; isn't
supported by IE (like most things) but there is a work around:
http://devnull.tagsoup.com/fixed/

for the header/menu/footer to remain in place as the content scrolls
needs a bit more work. using css-tables is by far the easiest way:

http://moreshit.usenetshit.info/1-2-1-layout-with-css-tables-thingy.shit

but of course css-tables are not supported by IE (one of M$s biggest
mistakes). if you're using a fixed size layout its pretty easy to use
absolute positioning and overflow <div>s for IE but with liquid layouts
its not robust enough to be practical. i would use a html-table with a
scrolling <div> inside the <td> thats used for the content.

http://moreshit.usenetshit.info/1-2-1-layout-with-scroll-content-for-crappy-ie-thingy.shit
 
A

Arondelle

PW said:
What if I want the content to be scrollable whilst leaving the menu static,
as I do here ... http://www.usaus.org

Um, I was trying to avoid a frameset as well, partly because the chrome
is ugly, but mostly because my audience doesn't like them. Something
about trying to bookmark a page inside a frame. I do have one in-line
frame for my content, which scrolls nicely when necessary without
disturbing the rest of the page and is virtually invisible. (Yes, they
will be annoyed that they *still* can't bookmark the page in the
iframe.) However, they won't have to keep going back to the menu to
view the next image/page.

The problem I was having with doing the whole layout with CSS was that
if I were to resize the browser window, the content (the iframe which
won't automatically resize) would either pop below the menu, or obscure
it in any one of several ways. One can never assume the user is going
to be browsing with his window opened to its full extent. So far, using
a single row, two column table allows the size of the menu column to be
dynamic, and squish down when the browser is collapsed, rather than have
the content frame go flying.

brucie's pretty pastel page also displays this annoying behavior when
the content is in an iframe.

Arondelle
 
B

brucie

in post: <
Arondelle said:
The problem I was having with doing the whole layout with CSS

it would be soooo much easier if you just posted the URL and asked "how
do i do this with css"
brucie's pretty pastel page also displays this annoying behavior when
the content is in an iframe.

nothing i do is ever gowd damn good enough for you is it!? if it wasn't
for the kids i'd want a divorce.
 
R

rf

Arondelle said:
Um, I was trying to avoid a frameset as well, partly because the chrome
is ugly, but mostly because my audience doesn't like them. Something
about trying to bookmark a page inside a frame. I do have one in-line
frame for my content, which scrolls nicely when necessary without
disturbing the rest of the page and is virtually invisible. (Yes, they
will be annoyed that they *still* can't bookmark the page in the
iframe.) However, they won't have to keep going back to the menu to
view the next image/page.

If the page is *that* long then put a duplicate navigation bar at the bottom
of the page.

Besides, what's so hard about pressing the home key? *You* might think there
is a problem, does your viewer?
The problem I was having with doing the whole layout with CSS was that
if I were to resize the browser window, the content (the iframe which
won't automatically resize) would either pop below the menu, or obscure
it in any one of several ways.

Another disadvantage of iframes.
One can never assume the user is going
to be browsing with his window opened to its full extent. So far, using
a single row, two column table allows the size of the menu column to be
dynamic, and squish down when the browser is collapsed, rather than have
the content frame go flying.

brucie's pretty pastel page also displays this annoying behavior when
the content is in an iframe.

Don't use an iframe then.

You will never get an iframe to reliably resize dynamically. Even if you do
your viewer will end up with *two* scroll bars.

Do you see google using an iframe? How about CNN? (bad example though, their
page isn't even fluid). What about Microsoft? (another bad example).
 
A

Arondelle

rf said:
Don't use an iframe then.

You will never get an iframe to reliably resize dynamically. Even if you do
your viewer will end up with *two* scroll bars.

Do you see google using an iframe? How about CNN? (bad example though, their
page isn't even fluid). What about Microsoft? (another bad example).

The iframe doesn't resize, dynamically or otherwise, and I don't want it to.

How do you suggest I place an external page into the content area, then?

Will post a link when I upload the file(s)....

Arondelle
 
R

rf

Arondelle said:
The iframe doesn't resize, dynamically or otherwise, and I don't want it to.

How do you suggest I place an external page into the content area, then?

Not with an iframe. You generate too many problems. I had a look at your
site and I must admit I was wrong, you don't generate two scroll bars, you
generate *four*. That makes the page very hard to use.

There are a number of ways to include content from another file. Just about
any server side scripting language would suffice.

http://allmyfaqs.com/faq.pl?Include_one_file_in_another

Plus, you are looking at this the wrong way round (from a frames perspective
I think). Don't have one static menu page and include your content. Have
many content pages and, on each of them, include (server side) your menu
content.
 
N

Nico Schuyt

brucie said:
but of course css-tables are not supported by IE (one of M$s biggest
mistakes). if you're using a fixed size layout its pretty easy to use
absolute positioning and overflow <div>s for IE but with liquid
layouts its not robust enough to be practical. i would use a
html-table with a scrolling <div> inside the <td> thats used for the
content.
http://moreshit.usenetshit.info/1-2-1-layout-with-scroll-content-for-crappy-ie-thingy.shit

Content box not scrollable in Mozilla :-(
http://www.vu-amstelland.nl/ seems to have solved that problem.
Nico
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top