473,795 Members | 2,766 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding a footer to a css based layout ?

I've added a footer div to a website, which I've positioned using

div#footer {width : auto ; border : 0 ; position : absolute ; bottom : 0 ;
margin : 1.33em 1.33em 1.33em 1.33em ;
background : teal ; font-size : 75% ; color : white ;}

This appears to create a full width bar in IE6/netscape7.1, and a small bar
on the left in opera 7.11, which is placed at the bottom of the browser
window, even though the content may be longer than the browser window,
forcing the browser to use vertical scroll bars to scroll down the content,
and so putting the footer over the content.

This can be seen on www.woodleyzebrasfc.com/index.html and particularly when
using a browser window that is not very tall.
This is not the effect I'm trying to create. What I want is to position the
bar at the bottom of the content, so that it can only be seen by scrolling
down the content to the bottom.

What approach should I use to get this effect ?

Also is the opera behavior where it doesn't create a full width bar correct
or is this a known opera bug. If so are there any workarounds ?
Regards
Tony
Jul 20 '05 #1
3 5698
See http://scott.sauyet.name/CSS/Demo/FooterDemo1.html

--Dan
--
FREE scripts that make web and database programming easier
http://www.analysisandsolutions.com/software/
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7th Ave #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
Jul 20 '05 #2
Tony Benham wrote:
"Analysis&Solut ions" <in**@analysisa ndsolutions.com > wrote in message
news:bk******** **@reader2.pani x.com...
See http://scott.sauyet.name/CSS/Demo/FooterDemo1.html


By modifying my css I cannot seem to get this approach to work. I have
div#top, div#main, div#sidebar div#foorter for the top/side/main/footer
windows. I enclosed them all a contents div, which used the parameters in
the example quoted.
In IE the footer bar was at the top of the browser window with a margin, and
in NS7.1 it stays at the bottom of the browser window, even if the content
runs off the bottom as it does now.
Regards
Tony


Honestly, I wouldn't utilize this approach as it already has too many
caveats i.e. it doesn't say that it works for IE 5.0 win, what about IE
on the Mac and it doesn't work for Opera. Did you honestly expect it to
work on NN 7.1 ;-) Too limited for what you get IMO.

Have you simply tried to do the following:

div#footer {clear: both}

This won't make your footer part of the bottom of the browser window but
will keep it at the end of the content which makes more sense IMHO.

BTW you can drop the "div#" in your style sheet rules *iff* you like -
as they are not necessary (this is purely an opinion so do what you like
with it).

--Nikolaos

Jul 20 '05 #3
Nikolaos Giannopoulos wrote:
Tony Benham wrote:

Have you simply tried to do the following:

div#footer {clear: both}


Nix that as your using absolute positioning. Personally I find that
absolute positioning leads to sites that are not as fluid as they can be
and thus I avoid it if I can.

Honestly I would change the layout to one that floats sections into
place and will in the end cause you the least grief IMO.

You can use google to find other 2 column layouts - if you use one with
floats then you can apply my suggestion above.

--Nikolaos

Jul 20 '05 #4

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

Similar topics

82
10725
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | | | | | | | | left | center | right | | | | | | | | |
9
10664
by: Alan Little | last post by:
I have a layout with a four-column page. The content is dynamic, and I want to have a footer that will float up or down depending on the content. I've tried several approaches and can't get it to work. Here's the page: http://development2.holotech.net/portal/ If I give the footer item an bottom property, it disappears altogether. Any ideas?
7
2896
by: Xavier Onassis | last post by:
I would be grateful for recommendations for a CSS layout (header, 2 cols, footer) that can accomodate dynamically added elements. I am not having any luck so far getting this to work in Mozilla/Firefox. Success so far only with IE. In Mozilla/Firefox, the layout does not adjust when nodes are inserted into the document dynamically. Layout: H E A D E R COL1 COL2
7
2620
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, primarily due to the footer not being aware of the columns due to me floating / positioning them. I have the following (very simple) markup: <div id="head">...</div> <div id="left">...</div>
4
1941
by: sonya11 | last post by:
hi all, sorry I realize the topic is well known, anyway is there a way without using javascript to have a footer always under a 3 column layout with Absolute Positioning ? I don' t want to use float 'cause I want to organize content in a better order for accessibility and search engine optimization ( content first ) and I cannot know in advance the height of the central column 'cause the content is taken
7
8731
by: xkeops | last post by:
Thinking of creating a website, most of the pages will have a general toolbar menu, a content and a footer. The content will be the only one who's gonna change but the rest (header,footer) will remain the same. I am interested to know your opinions/suggestions in finding an easy way of doing it. In asp one could have something like this:
2
2065
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 looks in each IE and FIREFOX: http://www.tanguay.info/web/examples/twoColumnWithFooterFirefoxIeProblem.png Does anyone have any idea what I might try to get both IE and FIREFOX
11
16585
by: Grischa Brockhaus | last post by:
Hi, I'm trying to produce a div layout containing a header on the top with fixed height, a footer on the bottom using fixed height and a content layer using what's left of the browsers window. So my header div is defined at top:0; height:40px , my footer is defined as bottom:0; height:40px and the content is defined as top:40px;bottom:40px; This works very well with firefox but doesn't work with IE, as IE ignores the bottom statement...
2
1923
by: stevenews | last post by:
Hi All, I have a footer div that I can't make behave!! It has the same css as the div above it, but it won't align...I've included the pertinent css: a container that holds the entire layout, the div above the footer for reference, and the footer itself. I have the pertinent html below the css. BTW, this is only breaking in IE!! (comments added only for this post) Thanks!!! /* THE BODY FOR LAYOUT CENTERING */ body {...
0
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10436
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10213
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10163
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9040
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.