HighDots Forums  

Re: Positioning a DIV at bottom of page

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


Discuss Re: Positioning a DIV at bottom of page in the Cascading Style Sheets forum.



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

Default Re: Positioning a DIV at bottom of page - 05-13-2004 , 12:37 AM






On Wed, 12 May 2004 23:00:47 -0500, John Smith
<3rtwemte001 (AT) sneakemail (DOT) com> wrote:

Quote:
Is it possible to position a DIV so that it will always be at the
bottom of the screen without having to use absolute positioning or
using the background image workaround?
Kind of. Microsoft won't support it, but it exists. Write to Microsoft and
ask them to fix IE6 to support position: fixed; - if enough people do it,
they might...


Reply With Quote
  #2  
Old   
Neal
 
Posts: n/a

Default Re: Positioning a DIV at bottom of page - 05-13-2004 , 12:56 AM






On Wed, 12 May 2004 23:42:26 -0500, John Smith
<3rtwemte001 (AT) sneakemail (DOT) com> wrote:

Quote:
On Thu, 13 May 2004 00:37:56 -0400, Neal <neal413 (AT) yahoo (DOT) com> wrote:

:On Wed, 12 May 2004 23:00:47 -0500, John Smith
:<3rtwemte001 (AT) sneakemail (DOT) com> wrote:
:
:> Is it possible to position a DIV so that it will always be at the
:> bottom of the screen without having to use absolute positioning or
:> using the background image workaround?
:
:Kind of. Microsoft won't support it, but it exists. Write to Microsoft
and
:ask them to fix IE6 to support position: fixed; - if enough people do
it,
:they might...


How is this different that position: absolute? It looks like I would
still have to set a top value....
Nope. position: absolute; bottom: 0; should put the element at the bottom
of the page, whether above the fold or below, and it scrolls with the
page. Fixed won't scroll, it stays put, and using bottom: 0; it serves as
a "footer" at the bottom of the viewport.


Reply With Quote
  #3  
Old   
Barry Pearson
 
Posts: n/a

Default Re: Positioning a DIV at bottom of page - 05-13-2004 , 05:28 AM



Neal wrote:
Quote:
On Wed, 12 May 2004 23:00:47 -0500, John Smith
3rtwemte001 (AT) sneakemail (DOT) com> wrote:

Is it possible to position a DIV so that it will always be at the
bottom of the screen without having to use absolute positioning or
using the background image workaround?

Kind of. Microsoft won't support it, but it exists. Write to
Microsoft and ask them to fix IE6 to support position: fixed; - if
enough people do it, they might...
True. But there are some work-arounds, for IE's lack of support for {
position: fixed }. There are separate work-arounds for IE 5 & IE 6. I think I
read about them here.

I used the following extra CSS for one page. I used a conditional comment in
the head block so that only IE saw this. It overrode the "fixed" value of one
of the rules seen by other browsers. It only works for certain of the
elements, I think. (And is *not* a substitute for IE doing things right!)

html {
overflow: hidden;
}
body {
height: 100%;
overflow: auto;
}
..someclass {
position: absolute;
}

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/




Reply With Quote
  #4  
Old   
Haines Brown
 
Posts: n/a

Default Re: Positioning a DIV at bottom of page - 05-13-2004 , 01:28 PM



"Barry Pearson" <news (AT) childsupportanalysis (DOT) co.uk> writes:

Quote:
Neal wrote:

I used the following extra CSS for one page. I used a conditional
comment in the head block so that only IE saw this.
Neal,

I understand your general point, but wondered about "conditional
comment." Don't EI and Mozilla respond to a comment in the header
style the same way?

--
Haines Brown



Reply With Quote
  #5  
Old   
Els
 
Posts: n/a

Default Re: Positioning a DIV at bottom of page - 05-13-2004 , 01:35 PM



Haines Brown wrote:

Quote:
"Barry Pearson" <news (AT) childsupportanalysis (DOT) co.uk> writes:

Neal wrote:

I used the following extra CSS for one page. I used a conditional
comment in the head block so that only IE saw this.

Neal,

I understand your general point, but wondered about "conditional
comment." Don't EI and Mozilla respond to a comment in the header
style the same way?
It's Barry who mentioned the conditional comment, not Neal ;-)

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -



Reply With Quote
  #6  
Old   
Neal
 
Posts: n/a

Default Re: Positioning a DIV at bottom of page - 05-13-2004 , 05:13 PM



On Thu, 13 May 2004 17:28:46 GMT, Haines Brown
<brownh (AT) teufel (DOT) hartford-hwp.com> wrote:

Quote:
"Barry Pearson" <news (AT) childsupportanalysis (DOT) co.uk> writes:

Neal wrote:

I used the following extra CSS for one page. I used a conditional
comment in the head block so that only IE saw this.

Neal,

I understand your general point, but wondered about "conditional
comment." Don't EI and Mozilla respond to a comment in the header
style the same way?

That was Barry. Watch the attributions.


Reply With Quote
  #7  
Old   
Barry Pearson
 
Posts: n/a

Default Re: Positioning a DIV at bottom of page - 05-18-2004 , 01:22 PM



Els wrote:
Quote:
Haines Brown wrote:
"Barry Pearson" <news (AT) childsupportanalysis (DOT) co.uk> writes:
[snip]
I used the following extra CSS for one page. I used a conditional
comment in the head block so that only IE saw this.

Neal,
I understand your general point, but wondered about "conditional
comment." Don't EI and Mozilla respond to a comment in the header
style the same way?

It's Barry who mentioned the conditional comment, not Neal ;-)
I've lost track of who is asking what of whom!

There are ways to put conditional comments in the head-block so that (as far
as I know) only IE will take action. All other browsers will treat them as the
comments they are. I've seen references to the material on the MS site, but I
can't find the reference at the moment.

Example, from a head-block:

<!--[if IE]>
<link href="exhibit05_ie.css" rel="stylesheet" type="text/css">
<![endif]-->

This will cause IE, and no other browser, to use exhibit05_ie.css in the
cascade. See, for example, the following page. In non-IE browsers it takes the
cells of a table and uses { position: fixed } to stick them to the corners &
sides of the viewport. But IE doesn't support { position: fixed }, so a
work-around it needed. This page uses a tricky combination of html & body
rules & { position: absolute }. And then, even in IE, it can stick the cells
of a table to the corners & sides of the viewport.

http://www.barry.pearson.name/articl.../exhibit05.htm

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/




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.