473,396 Members | 2,140 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,396 software developers and data experts.

? Scalable layout with sections

Hi,

I need help redesigning my website. I want to have a header, contents
bar, main content, and footer. I want the whole thing to be static, that
is, I want all sections to be visible at all times with the main content
section being scrollable. Like this:

+------------------------------------+
| logo |
+--------+---------------------------+
| menu | main content, with |
| | scrollbars if the content |
| | is too long |
| | |
+--------+---------------------------+
| misc data |
+------------------------------------+

I've already implemented it nicely with CSS but I've had to use
hard-coded values for positioning while setting it up which is bad because
when the browser is resized (or screen resolution changed) it ends up
looking awful.

I'm looking for a good tutorial on how to do this properly. I found one
that looked promising but when I implemented it's method it didn't work
because their example had the same background for the middle sections which
was fine, but when I changed the backgrounds, it looks bad when it gets
resized because for example the content section is bigger than the menu bar
so the default background shows up behind the menu bar. Also, the footer
would not stay attached to the bottom of the browser at all times.
Does anyone know of a good place?
Thanks.

--
Alec S.
alec <@> synetech <.> cjb <.> net

Jul 20 '05 #1
10 2343
Alec S. wrote:

I've already implemented it nicely with CSS but I've had to use
hard-coded values for positioning while setting it up which is bad because
when the browser is resized (or screen resolution changed) it ends up
looking awful.

An URL would go a long way toward helping you.
Have you tried using % or ems instead of pixels?

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 20 '05 #2
Alec S. wrote:
Hi,

I need help redesigning my website. I want to have a header, contents
bar, main content, and footer. I want the whole thing to be static, that
is, I want all sections to be visible at all times with the main content
section being scrollable. Like this:

+------------------------------------+
| logo |
+--------+---------------------------+
| menu | main content, with |
| | scrollbars if the content |
| | is too long |
| | |
+--------+---------------------------+
| misc data |
+------------------------------------+


My site (sig) does this but without the footer. I would imagine that
shouldn't be too hard to add in. Note that it only works on browsers
that support position: fixed; - there are work-arounds for IE but I
refuse to cobble them in on principle.

Almost all sizes are specified in em units, so the whole thing is
resizable. Only the header bar size is fixed, so the top left links get
a bit unwieldy at very large font sizes. That's a trade-off I've chosen
to make.

You might find this article on dynamic resizing interesting:

http://www.themaninblue.com/writing/...ve/2004/09/21/

He uses a Javascript style switcher to change layout if the window size
gets too small for the normal layout. I use this to good (IMO) effect on
my latest creation:

http://step-by-step.org.uk/

Shrink the window width below 695px and the header, menu and
"decoration" images resize and.

--
Mark.
http://tranchant.plus.com/
Jul 20 '05 #3
On Thu, 23 Sep 2004 18:43:27 GMT, "Alec S." <a@a.com> wrote:
I need help redesigning my website.... [...]+------------------------------------+
| logo |
+--------+---------------------------+
| menu | main content, with |
| | scrollbars if the content |
| | is too long |
| | |
+--------+---------------------------+
| misc data |
+------------------------------------+ [...]I'm looking for a good tutorial...

[...]

This may be close to what you are looking for...

<http://www.css.nu/exp/nf-illustration.html>

[for the Mozilla & Opera families of browsers]

....but really, MSIE stifles a lot of possible creativity on the www due
to its total lack of support for some really basic areas of "electronic
typesetting".

--
Rex
Jul 20 '05 #4
Thanks everyone but I found a great solution in one of those CSS forums.
It turns out the trick (the part I was missing) was to specify the bottom of
the middle sections. doh!
--
Alec S.
alec <@> synetech <.> cjb <.> net
"Alec S." <a@a.com> wrote in message
news:jP***************@news04.bloor.is.net.cable.r ogers.com...
+------------------------------------+
| logo |
+--------+---------------------------+
| menu | main content, with |
| | scrollbars if the content |
| | is too long |
| | |
+--------+---------------------------+
| misc data |
+------------------------------------+

Jul 20 '05 #5
Alec S. <a@a.com> wrote:
+------------------------------------+
logo |

+--------+---------------------------+
menu | main content, with |
| scrollbars if the content |
| is too long |
| |

+--------+---------------------------+
misc data |

+------------------------------------+

can you post the code?!
--
Curioso
Jul 20 '05 #6
On Fri, 24 Sep 2004 20:56:19 +0200, Curioso <cu*****@despammed.com> wrote:
Alec S. <a@a.com> wrote:
+------------------------------------+
logo |

+--------+---------------------------+
menu | main content, with |
| scrollbars if the content |
| is too long |
| |

+--------+---------------------------+
misc data |

+------------------------------------+

can you post the code?!


Post a URL instead. Only tiny bits of code should be posted, full page
layouts should not be.

Jul 20 '05 #7
On Thu, 23 Sep 2004 18:43:27 GMT, Alec S. <a@a.com> wrote:
Hi,

I need help redesigning my website. I want to have a header,
contents
bar, main content, and footer. I want the whole thing to be static, that
is, I want all sections to be visible at all times with the main content
section being scrollable. Like this:

+------------------------------------+
| logo |
+--------+---------------------------+
| menu | main content, with |
| | scrollbars if the content |
| | is too long |
| | |
+--------+---------------------------+
| misc data |
+------------------------------------+


This isn't easy. Well, it could be if IE supported fixed positioning.

Take a look at http://webpages.charter.net/mmmbeer/...layouts/fixed/
for a method of doing this. This page screws the footer up in IE, but play
with the ideas.
Jul 20 '05 #8
On Fri, 24 Sep 2004 15:16:32 -0400, Neal wrote:
Post a URL instead.


For further tips on an ideal example, check here..
<http://www.spartanicus.utvinternet.ie/help_us_help_you.htm>

--
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 20 '05 #9
I just got an idea. I figured this would work:

<html>
<head>
<style type="text/css">
html,body {
overflow :hidden;
}

#header {
background :#f80;
position :absolute;
top :0px;
left :0px;
width :100%;
height :75px;
}

#contents {
background :#0f8;
position :absolute;
top :75px;
left :0px;
bottom :25px;
width :150px;
}

#main {
background :#08f;
position :absolute;
top :75px;
left :150px;
bottom :25px;
right :0px;
overflow :auto;
}

#footer {
background :#80f;
position :absolute;
left :0px;
bottom :0px;
width :100%;
height :25px;
}
</style>
</head>

<body>
<div id="header" ></div>
<div id="contents"></div>
<div id="main" ></div>
<div id="footer" ></div>
</body>
</html>
And in FireFox it does. In Opera it almost does but the main section
doesn't go to the right edge, it is indented about 20 pixels; using
right:0px won't push it to the right edge but using width:100% does and
using left:0px pushes it to the left edge. Opera also shows the main
scrollbar when the browser is resized smaller even though I set it to
hidden. In IE it's downright terrible; the header and footer touch the left
but are indented about 20 pixels from the right, the contents are the right
width but only a dozen pixel high, and the main section doesn't show up at
all unless I put something in it and then it just expands the main div to
the extent of the content. I've posted the IE thing separately because it
is a different issue.

This is discouraging. The above solution I thought of SHOULD work
(right?) at least in theory. Unfortunately it doesn't so my entire site has
to be put on hold again until I can get this fixed.
--
Alec S.
alec <@> synetech <.> cjb <.> net
Jul 20 '05 #10
"Neal" <ne*****@yahoo.com> wrote in message
news:op**************@news.individual.net...
This isn't easy. Well, it could be if IE supported fixed positioning.

Take a look at http://webpages.charter.net/mmmbeer/...layouts/fixed/
for a method of doing this. This page screws the footer up in IE, but play
with the ideas.


Yeah, sucky IE. :) I'm currently using absolute positioning and it's
okay. I'll look into fixed positioning soon.
--
Alec S.
alec <@> synetech <.> cjb <.> net

Jul 20 '05 #11

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

Similar topics

4
by: Marc-Olivier BERNARD | last post by:
Hi there, I need to create a classic layout like this: ------------------------\ top | ------------------------| | | | left| center |right|
5
by: Robert J. O'Hara | last post by:
For some time I've struggled with the problem of displaying simple captioned figures on webpages in a way that is robust and scalable. I tend to make "boring" (um, I mean "conservatively elegant")...
6
by: bazza | last post by:
Hi, Ive got a web page which I have distilled down to the following simple HTML... <html> <head> <title>Test</title> </head> <body> <table style="width:100%;height:100%"> <tr...
0
by: Old Wolf | last post by:
I have a site that I laid out with tables, and lots of grotty hacks and lots of markup generated by client-side javascript. I'm in the process of converting it to "nice" CSS code but have got...
3
by: Harry | last post by:
Hi. I'm trying to get a page layout using css instead of tables, where the various sections have fixed widths even when you resize the browser window. The css below produces the correct layout...
8
by: FuzzyLogik | last post by:
I am trying to make a logical link list, <ul> <li></li> </ul> But my sections have headers and footers. How do I do this? Example:
7
by: PB | last post by:
Hi, I need some CSS layout guidance because I think I've been staring at this too long! I designed my layout using Photoshop, then sliced everything up and saved as a CSS web page. My...
5
by: Ed Sproull [MSFT] | last post by:
First I'm pretty new to ASP.NET and I'm having a simple problem. I have small website with a header, sidebar and the the content. I want my content to appear beside my sidebar which seems to be a...
19
by: vecima | last post by:
first of all, hello (first time poster). the url in question: http://www.type3studios.com/?projects (i guess you can grab the html and css from there, but if you want, i'll post it.) EDIT:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...

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.