473,387 Members | 1,876 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,387 software developers and data experts.

Coercing a floating element that's not at the page's top to stop at the page's bottom

Hello, folks.

Is it possible to get the bottom of a floating element (in case, a DIV) to
dynamically adjust itself so that it essentially attaches to the bottom of
the page, even if the floating element is not at the top of the page? Please
see this illustration I've made; it will show the layout of the site:

http://www.2and2.net/Uploads/Images/...float-help.png

I can't use percentages since the header at the top is fixed size.

Setting the height of the DIV to 100% causes it to set itself to the length
of the entire page, so it becomes too long. I tried encasing everything
below the header (i.e., the menu, content, and footer) in a DIV with a class
declaration, but 100% still seems to have been set to the length of the
entire page.

I hope I'm explaining myself suitably well. Can I get any guidance? I
/could/ render the menu first, have it span the entire length of the left
side of the page, and set the internal top margin to the height of the
header, but that seems fairly jury-rigged.
--
J44xm <http://j44xm.notlong.com>
Jul 21 '05 #1
11 2226
J44xm wrote :
Hello, folks.

Is it possible to get the bottom of a floating element (in case, a DIV) to
dynamically adjust itself so that it essentially attaches to the bottom of
the page, even if the floating element is not at the top of the page? Please
see this illustration I've made; it will show the layout of the site:

http://www.2and2.net/Uploads/Images/...float-help.png

I can't use percentages since the header at the top is fixed size.

Setting the height of the DIV to 100% causes it to set itself to the length
of the entire page, so it becomes too long. I tried encasing everything
below the header (i.e., the menu, content, and footer) in a DIV with a class
declaration, but 100% still seems to have been set to the length of the
entire page.

I hope I'm explaining myself suitably well. Can I get any guidance? I
/could/ render the menu first, have it span the entire length of the left
side of the page, and set the internal top margin to the height of the
header, but that seems fairly jury-rigged.


is this helpfull?...

<style type="text/css">
#foot {position:absolute;bottom:0px;right:0px;}
</style>
....

<div id="foot">my feet smell</div>

--
order beef jerky online :
http://www.choicebeefjerky.com.au/order_online.html
not a beef jerky web site : http://mycoolfish.com/vote.cmks
go bare foot as often as possible

Jul 21 '05 #2
["Disco Octopus"; Thu, 14 Jul 2005 05:28:15 GMT]
is this helpfull?...

<style type="text/css">
#foot {position:absolute;bottom:0px;right:0px;}
</style>


That's the ticket: I needed to make the section's positioning absolute. I
should have realized this, but I was thinking, for some reason, that doing
this would throw off the page's flow. Thanks very much for your help.
--
J44xm <http://j44xm.notlong.com>
Jul 21 '05 #3
["J44xm"; Thu, 14 Jul 2005 18:48:58 GMT]
That's the ticket: I needed to make the section's positioning absolute. I
should have realized this, but I was thinking, for some reason, that doing
this would throw off the page's flow. Thanks very much for your help.


Update: It seems my absolute-positioning plan doesn't work in IE. This,
unfortunately, needs to be IE-friendly. Any other ideas?
--
J44xm <http://j44xm.notlong.com>
Jul 21 '05 #4
J44xm wrote :
["J44xm"; Thu, 14 Jul 2005 18:48:58 GMT]
That's the ticket: I needed to make the section's positioning absolute. I
should have realized this, but I was thinking, for some reason, that doing
this would throw off the page's flow. Thanks very much for your help.


Update: It seems my absolute-positioning plan doesn't work in IE. This,
unfortunately, needs to be IE-friendly. Any other ideas?


hmm. Works for me in IE6.
Are you able to show us you page online? or you actual code?

--
a beef jerky web site : http://www.choicebeefjerky.com.au
not a beef jerky web site : http://mycoolwheels.com/vote.cmks
if the oil light is on, dont think it will just go away

Jul 21 '05 #5
["Disco Octopus"; Thu, 14 Jul 2005 23:00:21 GMT]
hmm. Works for me in IE6.
Are you able to show us you page online? or you actual code?


I've since changed the code to a simple table layout, but I was essentially
using this:

div { /* the DIV is immediately underneath the header graphic */
position: absolute /* I also tried "float: left" */
left: 0; width: 20%;
bottom: 0
}

I believe this comprises the major settings. Is anything obvious lacking?
Thanks again.
--
J44xm <http://j44xm.notlong.com>
Jul 21 '05 #6
J44xm wrote :
["Disco Octopus"; Thu, 14 Jul 2005 23:00:21 GMT]
hmm. Works for me in IE6.
Are you able to show us you page online? or you actual code?


I've since changed the code to a simple table layout, but I was essentially
using this:

div { /* the DIV is immediately underneath the header graphic */
position: absolute /* I also tried "float: left" */
left: 0; width: 20%;
bottom: 0
}

I believe this comprises the major settings. Is anything obvious lacking?
Thanks again.


This works for me in IE....

http://mycoolfish.com/t/bottom_bit.html

--
a beef jerky web site : http://www.choicebeefjerky.com.au
not a beef jerky web site : http://mycoolwheels.com/vote.cmks
if the oil light is on, dont think it will just go away

Jul 21 '05 #7
J44xm wrote:
["Disco Octopus"; Thu, 14 Jul 2005 05:28:15 GMT]

is this helpfull?...

<style type="text/css">
#foot {position:absolute;bottom:0px;right:0px;}
</style>

That's the ticket: I needed to make the section's positioning absolute. I
should have realized this, but I was thinking, for some reason, that doing
this would throw off the page's flow. Thanks very much for your help.


Perhaps it doesn't apply in your case but have you checked what happens
when the content extends over one screen height?

Try adding something like this

<div style="position:relative;height:1px;">
<p id="foot">my feet smell</p>
</div>

(The height is declared to overcome peekaboo bug in IE)

Louise
Jul 21 '05 #8
boclair wrote:
J44xm wrote:
["Disco Octopus"; Thu, 14 Jul 2005 05:28:15 GMT]

is this helpfull?...

<style type="text/css">
#foot {position:absolute;bottom:0px;right:0px;}
</style>


That's the ticket: I needed to make the section's positioning
absolute. I should have realized this, but I was thinking, for some
reason, that doing this would throw off the page's flow. Thanks very
much for your help.

Perhaps it doesn't apply in your case but have you checked what happens
when the content extends over one screen height?

Try adding something like this

<div style="position:relative;height:1px;">
<p id="foot">my feet smell</p>
</div>

(The height is declared to overcome peekaboo bug in IE)


There should also be top declared, say 1em, on the wrapping div.

IE will mishandle this so include rule margin-bottom:0 in id foot.

Louise
Jul 21 '05 #9
boclair wrote:
boclair wrote:
J44xm wrote:
["Disco Octopus"; Thu, 14 Jul 2005 05:28:15 GMT]
is this helpfull?...

<style type="text/css">
#foot {position:absolute;bottom:0px;right:0px;}
</style>


That's the ticket: I needed to make the section's positioning
absolute. I should have realized this, but I was thinking, for some
reason, that doing this would throw off the page's flow. Thanks very
much for your help.


Perhaps it doesn't apply in your case but have you checked what
happens when the content extends over one screen height?

Try adding something like this

<div style="position:relative;height:1px;">
<p id="foot">my feet smell</p>
</div>

(The height is declared to overcome peekaboo bug in IE)

There should also be top declared, say 1em, on the wrapping div.

IE will mishandle this so include rule margin:0 in id foot.

Louise


Sorry. Meant to write of course
margin:0 NOT margin-bottom:0

Louise
Jul 21 '05 #10
["boclair"; Fri, 15 Jul 2005 00:29:57 GMT]
Try adding something like this


Forgive me for being dense, but were you saying that I should try this on
the page I'm working on, or were you speaking to Disco Octopus about the
code on that test page (http://mycoolfish.com/t/bottom_bit.html)?
--
J44xm <http://j44xm.notlong.com>
Jul 21 '05 #11
J44xm wrote:
["boclair"; Fri, 15 Jul 2005 00:29:57 GMT]

Try adding something like this

Forgive me for being dense, but were you saying that I should try this on
the page I'm working on, or were you speaking to Disco Octopus about the
code on that test page (http://mycoolfish.com/t/bottom_bit.html)?


I was addressing the proposal
#foot {position:absolute;bottom:0px;right:0px;}
and
<div id="foot">my feet smell</div>

This has problems if the content flows over more than one screen height.
The footer will be displayed at a position one screen height below the
top of the page

A generic solution is to wrap the footer in a container declaring
position relative. So, for example

<div style="position:relative;top:1em;height:1px">
<div id="foot">my feet smell</div>
</div>

The height declaration is to overcome a bug in IE's rendering. top
declaration is needed to ensure that footer in on a separate and last line

Louise
Jul 21 '05 #12

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

Similar topics

1
by: Jack'o'Light | last post by:
Hi.... I've been playing with a floating navbar, trying to get it to work with mixed success. If anyone is familiar with this particular breed, it is based on a DHTML library file available...
16
by: Michael Bernstein | last post by:
Hello, I've tried to solve this problem six ways from sunday, but I'm conceding defeat and asking for help at this point. The following site is rendering *very* oddly in Mozilla only. IE seems...
3
by: JHR | last post by:
Hey all, I'm trying to make a sidebar box float to the right of various items, and for those items to wrap if a user shrinks his browser window. Instead, in every browser I've tried except for...
2
by: Lee K. Seitz | last post by:
I stayed up late working on a CGI script and spent some time formatting my page with CSS. It looked fine in IE, which will be 95% of my audience, so I went to bed. Got up and looked at it in...
10
by: Florian Brucker | last post by:
There are several tutorials on the net showing you how to create a thumbnail gallery with floating thumbails which automagically uses all horizontal space available (e.g....
7
by: Frances Del Rio | last post by:
http://www.francesdelrio.com/fixed_div.html I picked up this neat script from www.dynamicdrive.com that does something I had always wanted to do, namely put a div at a certain distance from...
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
0
by: jstathan | last post by:
Starting off, here's the page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"...
1
by: hendrakieran | last post by:
Hi Guys, I'd like to get some help regarding creating a floating window with the following scenario: * I have index.html which is contains the frameset definition: <html> <head> </head>
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
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
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...

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.