HighDots Forums  

2 Column layout w. footer...

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss 2 Column layout w. footer... in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stian Lund
 
Posts: n/a

Default 2 Column layout w. footer... - 06-25-2004 , 04:40 AM






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
--

Reply With Quote
  #2  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: 2 Column layout w. footer... - 06-25-2004 , 05:45 AM






Stian Lund <stian.REMOVE.lund (AT) operamail (DOT) com> wrote:

Quote:
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.


Reply With Quote
  #3  
Old   
Rijk van Geijtenbeek
 
Posts: n/a

Default Re: 2 Column layout w. footer... - 06-25-2004 , 07:33 AM



On 25 Jun 2004 09:40:57 GMT, Stian Lund <stian.REMOVE.lund (AT) operamail (DOT) com>
wrote:

Quote:
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.

Quote:
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


Reply With Quote
  #4  
Old   
Stian Lund
 
Posts: n/a

Default Re: 2 Column layout w. footer... - 06-25-2004 , 09:09 AM



Harlan Messinger <hmessinger.removethis (AT) comcast (DOT) net> wrote in
news:kg0od09rdo918ebnchjfj8u5q4ib8ofdf3 (AT) 4ax (DOT) com:
Quote:
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
--



Reply With Quote
  #5  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: 2 Column layout w. footer... - 06-25-2004 , 09:59 AM




"Stian Lund" <stian.REMOVE.lund (AT) operamail (DOT) com> wrote

Quote:
Harlan Messinger <hmessinger.removethis (AT) comcast (DOT) net> wrote in
news:kg0od09rdo918ebnchjfj8u5q4ib8ofdf3 (AT) 4ax (DOT) 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.

Quote:
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
--



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.