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

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 3095
Stian Lund <st***************@operamail.com> 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.com>
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.com:
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.com> wrote in message
news:Xn*********************@130.133.1.4...
Harlan Messinger <hm*******************@comcast.net> wrote in
news:kg********************************@4ax.com:
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
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? ...
8
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...
15
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...
7
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,...
9
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...
3
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
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,...
2
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...
2
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,...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.