473,785 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2 Column layout w. footer...

Hi,
I'm trying to create a 2 column layout with a footer on the bottom, where
the (fixed-width) sidebar follows the content in the code, while showing
on the left hand side of the content.

The footer must stay at the bottom regardless of which column is the
longest, so absolute positioning is out, I need to use floats with the
clear: both; - property on the footer.

Doing this with the sidebar *before* the content in the code I know how
to do, no worries, but the other way around seems to be much harder.
There doesn't seem to be many other pages doing this, so I'm guessing
this might be near to 'impossible' to do in a dynamic way?

I found a pretty good starting point here:
http://www.ryanbrill.com/floats.htm

The sidebar is on the right hand side, so I have been trying to hack this
over to the left. Also, I need to be able to add padding and margins, and
if I mess with this, the result is often that the columns are pushed
down. I guess I need to think differently to do this... anyway, here's
what I've come up with for now:

http://stian.freeshell.org/test/test3.html

This does not scale well however, especially in Opera 7.51 (bug?), where
if you resize the page, the content seems to be fixed width. It scales ok
in MSIE and Mozilla, but I'd like it to work in Opera the most.

Anyway, any pointers or tips on how to do this? Any help appreciated, I'm
sure you CSS gurus can think of some way to do this :)

regards,
Stian
--
Jul 20 '05 #1
4 3108
Stian Lund <st************ ***@operamail.c om> wrote:
Hi,
I'm trying to create a 2 column layout with a footer on the bottom, where
the (fixed-width) sidebar follows the content in the code, while showing
on the left hand side of the content.

The footer must stay at the bottom regardless of which column is the
longest, so absolute positioning is out, I need to use floats with the
clear: both; - property on the footer.

Doing this with the sidebar *before* the content in the code I know how
to do, no worries, but the other way around seems to be much harder.
There doesn't seem to be many other pages doing this, so I'm guessing
this might be near to 'impossible' to do in a dynamic way?


I just happened to read this last night:

http://alistapart.com/articles/negativemargins/

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #2
On 25 Jun 2004 09:40:57 GMT, Stian Lund <st************ ***@operamail.c om>
wrote:
Hi,
I'm trying to create a 2 column layout with a footer on the bottom, where
the (fixed-width) sidebar follows the content in the code, while showing
on the left hand side of the content. ... http://stian.freeshell.org/test/test3.html

This does not scale well however, especially in Opera 7.51 (bug?), where
if you resize the page, the content seems to be fixed width. It scales ok
in MSIE and Mozilla, but I'd like it to work in Opera the most.
You've hit a known problem in Opera, changing the body width doesn't cause
a recalculation of widths of floated elements. Or something like that at
least.
Anyway, any pointers or tips on how to do this? Any help appreciated, I'm
sure you CSS gurus can think of some way to do this :)


I don't think there is a simple CSS solution for this, maybe some
javascript could help. But you could also ignore the case of changing
window sizes.

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #3
Harlan Messinger <hm************ *******@comcast .net> wrote in
news:kg******** *************** *********@4ax.c om:
I just happened to read this last night:
http://alistapart.com/articles/negativemargins/


That's a *great* article, and actually written by the same Ryan Brill who
created the example I'm working from. :)

But the examples used still have the sidebar on the right hand side, so I
don't get any farther...

However, I am actually getting somewhere now, so I've managed to get it
pretty dynamic with the menu on the left side, it wasn't as hard as I
first thought, so here is the situation:
http://stian.freeshell.org/test/test4.html

I've added some borders in colour to see what I'm doing, and I wrapped
the content and sidebar in another DIV to have more control of the
margins of the main elements.

So, It's setting somewhere - but I could still use some help with ways of
doing this the 'right' way...

cheers,
Stian
--

Jul 20 '05 #4

"Stian Lund" <st************ ***@operamail.c om> wrote in message
news:Xn******** *************@1 30.133.1.4...
Harlan Messinger <hm************ *******@comcast .net> wrote in
news:kg******** *************** *********@4ax.c om:
I just happened to read this last night:
http://alistapart.com/articles/negativemargins/
That's a *great* article, and actually written by the same Ryan Brill who
created the example I'm working from. :)

But the examples used still have the sidebar on the right hand side, so I
don't get any farther...


Check closely. There's a place in the article where he tells you what to
change if you want the sidebar on the left.

However, I am actually getting somewhere now, so I've managed to get it
pretty dynamic with the menu on the left side, it wasn't as hard as I
first thought, so here is the situation:
http://stian.freeshell.org/test/test4.html

I've added some borders in colour to see what I'm doing, and I wrapped
the content and sidebar in another DIV to have more control of the
margins of the main elements.

So, It's setting somewhere - but I could still use some help with ways of
doing this the 'right' way...

cheers,
Stian
--


Jul 20 '05 #5

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

Similar topics

16
6167
by: Dan V. | last post by:
How do you do a css 2 column layout with header and footer, with the 2nd column auto-stretching so entire page looks good for 800 x 600 resolution as min. and 1024 x 768 resolution as a max? Ideally the layout would be centered so it scales better visually. This would be great for me. Thanks,
8
3093
by: kaeli | last post by:
I have had a little free time lately to revisit a problem I have with the 3 column layout plus a header and footer. See this example: http://glish.com/css/7.asp There is a header and 3 columns. Pretend there's a footer at the bottom, too. :) Here are the issues I have been unable to solve without tables _somewhere_
15
2325
by: Tamblyne | last post by:
This problem has got to have a simple solution and I can't be the first person who has ever handled it. Perhaps Google is no help because I'm not using the right terms? (I did find one post on-point, but no one responded to it.) I have a two column layout with a header and a footer. If the "content" is longer than the "navigation", there is no problem. However, if the content is shorter than the navigation, the navigation menus...
7
2619
by: Andrew | last post by:
I've been struggling to achieve the following layout for some time now and I'm not getting anywhere. I've tried several approaches including floats & absolute positioning and none seem to work, primarily due to the footer not being aware of the columns due to me floating / positioning them. I have the following (very simple) markup: <div id="head">...</div> <div id="left">...</div>
9
1838
by: Xavier van Unen | last post by:
Hi guys and gals, I'm working on a 2 column CSS layout (for an ordering system) in which it isn't a priori known which of the two columns will be the longest, that depends on the (script generated) content. As there is also a following footer DIV, the usual floating one of the DIVs technique doesn't give the desired results, and has the floated DIV (if it is the longest one) being displayed/rendered through the footer DIV. I...
3
2183
by: Joel Byrd | last post by:
I've got a 2-column tableless layout and I'm using floats to render the columns. Here are the basic style definitions for the 2 columns: #left_col { width: 59%; float: left; clear: left; }
16
3042
by: Jef Driesen | last post by:
I have created a nice idea for a website and now I would like to translate that idea in (x)html and css. The layout is quite basic: a header, two columns and a footer. For a graphical presentation, see http://users.telenet.be/sacn/tmp/layout.png. I would like to have: * source ordered columns: header, content, sidebar, footer * fixed width columns (either px or em units). Because I don't like reading very long lines and IE does not...
2
2065
by: Edward | last post by:
I'm pursuing the holy grail of creating a two-column CSS layout with footer AND where the colors of the columns actually go all the way down. The code is below. Here is a graphic of how it looks in each IE and FIREFOX: http://www.tanguay.info/web/examples/twoColumnWithFooterFirefoxIeProblem.png Does anyone have any idea what I might try to get both IE and FIREFOX
2
6062
by: Eric Lindsay | last post by:
I hope someone can help, before I start thinking tables have a lot of merit after all. I am trying to achieve a two column layout, with source code div order main content, right side navigation, footer. Naturally I want liquid main contents, and I have float: right; img, and clear: both; paragraphs in the main contents div. Fixed width right navigation column is probably essential. There is a confounded logo graphic to go at the top...
0
9646
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10346
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9956
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8982
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7504
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2887
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.