I have a strange problem that I'm hoping someone can help me with.
I want a footer at the bottom of my simple HTML page to span the entire
width of the page. I'm not using floats, columns or any other such complex
things. Here is the ridiculously simple markup I'm using:
<body>
<div id="footer">A Simple Footer Test</div>
</body>
And the style sheet markup that goes with this is:
body {
margin: 0;
padding: 0;
}
#footer {
background: #933;
color: #FFF;
position: absolute;
bottom: 0px;
width: 100%;
}
Here's the problem. This shows up in IE just fine (the footer area spans the
entire document width). In Mozilla 1.5, the browser I use most often, the
DIV appears off the page a little (the horizontal scroll bar shows up, even
though it ideally shouldn't). When I make some changes to the #footer CSS
style, it shows up just fine in Mozilla (no scroll bar and it spans the
entire width) but is broken in IE (the footer does not span the entire
document width). Here is that altered code:
#footer {
position: absolute;
bottom: 0px;
left: 0px;
right: 0px;
}
What is going on here? Mozilla gets the latter code snippet right, and that
seems like the better way of doing it (I'm "pinning", so to speak, the sides
of the DIV to a certain location). But IE breaks on that code. Ironically,
I'll be displaying this HTML in IE all the time (I'm writing an application
using the CHtmlView class in MFC), so the first snippet is fine. I just want
to know if I'm going about this the wrong way and why Mozilla (which seems
to be *way* more standards compliant than IE) gets it "wrong".
Any ideas?
Jonah 3 2092
Jonah Bishop wrote: I want a footer at the bottom of my simple HTML page to span the entire width of the page. I'm not using floats, columns or any other such complex things.
Loose the positioning, simply insert the html as the last element on the
page.
--
Spartanicus
Well, I'd like the footer to be at the bottom of the "window" so to speak. I
know fixed positioning would do this, but here is what I'd ideally like:
When the page is too short to require vertical scrolling, the bar should
appear at the bottom of the window. When it does require scrolling, it
should appear at the bottom of the document. Is this even possible?
Jonah
"Spartanicu s" <me@privacy.net > wrote in message
news:k5******** *************** *********@news. spartanicus.utv internet.ie... Jonah Bishop wrote:
I want a footer at the bottom of my simple HTML page to span the entire width of the page. I'm not using floats, columns or any other such
complexthings.
Loose the positioning, simply insert the html as the last element on the page.
-- Spartanicus
Jonah Bishop wrote: When the page is too short to require vertical scrolling, the bar should appear at the bottom of the window.
I doubt that it's possible to do that.
When it does require scrolling, it should appear at the bottom of the document.
Fraught with problems if you want it to work cross browser afaik.
--
Spartanicus This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Griff Miller |
last post by:
Please see http://home.houston.rr.com/gmiller15/css/vertprob.html .
In mozilla 1.6/1.7 it looks the way I want it, with a thin separation
between the two boxes. In IE6, the two boxes touch, which is not what I
want. Is there a way to get IE6 to do it the mozilla way?
Thanks!
Griff
|
by: mike eli |
last post by:
Hi,
I have several absolute positioned elements inside an absolute
positioned DIV.
I would like one of the nested elements to have a dynamic width. I set
it's left and right attributes to 5, so the the element should have a
width = parentWidth - 10; This is the desired behaviour, but it won't
work. I still have to specify a width or the...
|
by: Alan Silver |
last post by:
Hello,
Having been a light reader of this ng for a few months now (after
several years absence), I have noticed that absolute positioning seems
to be considered a Very Bad Thing around here. Generally, when someone
posts a question about a design that uses it, they are told not to.
Now, in my ignorance, I don't see what's wrong with it,...
|
by: horusprim |
last post by:
Is there a CSS absolute positioning rendering bug in FF1.02 and IE 6?
I have been experimenting with precision absolute positioning in CSS.
The following test content was used in the experiment:
"This sentence is to be about nine words long. I hope this test suite
works. Mary had a little lamb and its fleece was white as snow."
Next a...
|
by: nonsensitor |
last post by:
I'm just learning xhtml & css, primarily from westciv's online tutorials and css guide. I've run into a couple of problems with a page I'm developing that I can't figure out.
The first problem is that I would like to display some text on top of an image within the header. I've tried using absolute positioning to specify where the phone number...
| |
by: Mark |
last post by:
hi, i'm trying to position something in the top right corner of a
container, but i can't seem to figure out how to get it working.
here's the html
<div class='thumb'><a href='image.jpg'><img src='photos/thumbs/
bigsmile.jpg'></a><a class='del' href='?p=gallery&del=2'>x</a></div>
where 'thumb' is my container, and 'del' should be aligned...
|
by: rhino |
last post by:
I've got some positioning problems that I can't figure out. Can anyone help?
My website was working fine in IE7 and the current releases of Firefox and
Opera so I had a look at it in IE6 and found that it was messed up. The
major problem is that in IE6 the index, which was supposed to be on the
left, was on the right, OVERLAYING the content...
|
by: mehstg1319 |
last post by:
Hi there
Not sure if anyone can help me, I am working on a site for my
university, and am having a bit of trouble with css positioning. I am
very new to css and do not know very much about it.
Here is the link: http://homepages.feis.herts.ac.uk/~bp6ar/bus_intel/matrix/matrix.html
Basically, the problem is that the ticks on the grid...
|
by: Fistro |
last post by:
I'm trying to find a design that would allow me to build web pages
without having to worry about compatibility issues (not too much, in
any case,,,)
I've came across this CSS layout technique:
http://alistapart.com/articles/fauxabsolutepositioning
It calculates the left offset from a fixed position, as opposed to
calculating it from the...
|
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. ...
|
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...
| |
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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
| |