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

Footer to extend across page width

Greetings.

I have a two-column web layout, where the first column is just the regular
body text with a "marign-right" of 16em, and the second column is an
"absolute"-positioned div with a width of 16em.

I would like to have a footer extending across the entire width of the page,
at the very bottom of the page (i.e., after both columns end). How can I
do this? There is no way of knowing in advance which of the two columns
will be longer.

If I use "absolute" positioning and specify a "bottom" of 0, I get the
footer positioned at the bottom of the window, and it scrolls up with the
rest of the page when I scroll down to the end of the columns. Setting
"clear: both" doesn't seem to have any effect either. I don't want to use
"fixed" positioning because it's broken in MSIE, and don't want the footer
to scroll along with the page anyway. I just want it waiting there at the
end.

Here's a link to the HTML and CSS itself, followed by some relevant snippets
from the CSS file:

http://www.dfki.uni-kl.de/~miller/
http://www.dfki.uni-kl.de/~miller/dfki_css.css

body {
margin-right: 16em;
}

#sidebar {
position: absolute;
top: 90px;
right: 1.1em;
width: 16em;
padding-right: 0;
padding-bottom: 0;
}

#footer {
/* what goes here?? */
}

Any help would be greatly appreciated.

Regards,
Tristan

--
_
_V.-o Tristan Miller [en,(fr,de,ia)] >< Space is limited
/ |`-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <> In a haiku, so it's hard
(7_\\ http://www.nothingisreal.com/ >< To finish what you
Jul 20 '05 #1
2 4444
Tristan Miller wrote:

[http://www.dfki.uni-kl.de/~miller/]
...
I have a two-column web layout, where the first column is just the
regular body text with a "marign-right" of 16em, and the second
column is an "absolute"-positioned div with a width of 16em.
Have you considered floating the second column instead?
I would like to have a footer extending across the entire width of
the page, at the very bottom of the page (i.e., after both columns
end). How can I do this? There is no way of knowing in advance
which of the two columns will be longer.


clear:both is a popular method - pehaps it will work in your circumstances.

--
William Tasso - http://WilliamTasso.com
Jul 20 '05 #2

"Tristan Miller" <ps********@nothingisreal.com> wrote in message
news:14****************@ID-187157.news.dfncis.de...
Greetings.

I have a two-column web layout, where the first column is just the regular
body text with a "marign-right" of 16em, and the second column is an
"absolute"-positioned div with a width of 16em.

I would like to have a footer extending across the entire width of the page, at the very bottom of the page (i.e., after both columns end). How can I
do this? There is no way of knowing in advance which of the two columns
will be longer.

If I use "absolute" positioning and specify a "bottom" of 0, I get the
footer positioned at the bottom of the window, and it scrolls up with the
rest of the page when I scroll down to the end of the columns. Setting
"clear: both" doesn't seem to have any effect either. I don't want to use
"fixed" positioning because it's broken in MSIE, and don't want the footer
to scroll along with the page anyway. I just want it waiting there at the
end.

Here's a link to the HTML and CSS itself, followed by some relevant snippets from the CSS file:

http://www.dfki.uni-kl.de/~miller/
http://www.dfki.uni-kl.de/~miller/dfki_css.css

body {
margin-right: 16em;
}

#sidebar {
position: absolute;
top: 90px;
right: 1.1em;
width: 16em;
padding-right: 0;
padding-bottom: 0;
}

#footer {
/* what goes here?? */
}

The typical solution:

#header {
position: absolute;
top: 0;
left: 0;
}

#text {
float: left;
margin-top: (whatever clears the header);
width: (either a % or the actual size);
}

#sidebar {
float: right;
margin-top: (whatever clears the header);
width: (either a % or the actual size);
}

#footer {
clear: both;
}

If you move your header div to the top of the code, you can avoid having to
set a top margin on the floats, and they'll automatically line up OK. Just
eliminate the absolute positioning on it and those puppies will float fine.
In any case, your footer div should be at the end of the code as it is.
Jul 20 '05 #3

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

Similar topics

1
by: Will Buntin | last post by:
I am trying to design my site without tables, using CSS for positioning and am having limited success. My main issue is I have a three column layout and my footer needs to run across the page,...
11
by: Peter Wu | last post by:
Hello, I want to create a Header and Footer for every ASPX page I build. I created 2 Web user controls respectively and placed them in an ASPX page. The problem is that I cannot position the...
1
by: Stu | last post by:
Hi, I have a button in the footer of a datagrid that sometimes does not tigger the item command. The page is quite large & has a number of homegrown controls in it. Has anyone come across this...
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,...
16
by: Edward | last post by:
This is a three-column DIV page with a menu bar DIV under them. Easy enough with table layouting but with CSS I can't get it to work: http://tanguay.info/web/examples/threeColumnsColor.htm 1....
13
Death Slaught
by: Death Slaught | last post by:
I have my entire page in my "main" div. div.main { width: 100%; height: 100%; border: 1px solid gray; } on the left of the page I have a banner.
3
by: rassklass | last post by:
HI all, I have designed a site found at www.pickupnewspapers.co.uk/nottinghamshire/index.html but I cant get the footer to sit stil on the page. It is because of the javascript ticker, everytime...
11
by: Michael7 | last post by:
Hi everyone, Me again, been a while since I've been here, but I'm back again needing help with a simple thing. I've searched for help on creating a footer, but all the help I've found, was...
1
by: donpro | last post by:
Hi, I'm creating a template paging sing pure CSS and all looks good except the footer which I am having problems with. 1) When I space out each of the FOUR DIVS at 25%, it wraps in IE. I...
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: 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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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.