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

Margins not correct in Firefox

Can someone tell me how I can make it so that on this page
http://s195679515.onlinehome.us/essence/index.html
in Firefox, the space after the main content and the bottom boxes is
only 5px? As it is now, it seems as though the Firefox is adding extra
pixels, which I can't seem to find where in my code that is coming
from. I've tried getting rid of the clear property of the div
(#block), but that moves part of it up to the top of the screen.

Sep 19 '07 #1
3 2844
alice wrote:
Can someone tell me how I can make it so that on this page
http://s195679515.onlinehome.us/essence/index.html in Firefox, the
space after the main content and the bottom boxes is only 5px? As it
is now, it seems as though the Firefox is adding extra pixels, which
I can't seem to find where in my code that is coming from. I've tried
getting rid of the clear property of the div (#block), but that moves
part of it up to the top of the screen.
Before you start looking for 5 pixels, maybe if you fixed some of the
errors, the page would work as you think it should.

<http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fs195679515.online home.us%2Fessence%2Findex.php>
"Failed validation, 81 Errors"

New pages should be Strict, rather than Transitional, and unless you
have a compelling reason to use XHTML, should be HTML 4.01

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

You will want to look into this as well:
http://k75s.home.att.net/fontsize.html

--
-bts
-Motorcycles defy gravity; cars just suck
Sep 19 '07 #2
alice wrote:
Can someone tell me how I can make it so that on this page
http://s195679515.onlinehome.us/essence/index.html
in Firefox, the space after the main content and the bottom boxes is
only 5px? As it is now, it seems as though the Firefox is adding extra
pixels, which I can't seem to find where in my code that is coming
from. I've tried getting rid of the clear property of the div
(#block), but that moves part of it up to the top of the screen.
Get rid of the margin-bottom: 5px from either #fill or #swap .

--
Beware of bugs in the above code; I have only proved it correct, not
tried it. -- Donald E. Knuth
Sep 19 '07 #3
On 2007-09-19, alice <al***@fearofdolls.comwrote:
Can someone tell me how I can make it so that on this page
http://s195679515.onlinehome.us/essence/index.html
in Firefox, the space after the main content and the bottom boxes is
only 5px? As it is now, it seems as though the Firefox is adding extra
pixels, which I can't seem to find where in my code that is coming
from. I've tried getting rid of the clear property of the div
(#block), but that moves part of it up to the top of the screen.
What browser are you comparing it with? I think the total gap of 10px is
correct. You've got #swap with 5px bottom margin followed by #fill with
another 5px bottom margin. Both are floats, so those margins should not
collapse even though #fill has zero-height.

The following box has clear set on it so it should correctly clear to
below the preceding bottom margin (although it might lose some of its
top margin if it had any).

You are relying on quite a few tricky rules here though. It's possible
you put #fill in in the first place because some other browser was
incorrectly not clearing the bottom margin of #swap.

If you use padding instead of margins there are fewer rules to worry
about-- padding doesn't collapse and isn't involved in the specification
of clear the way margin is. You could try giving #swap padding-bottom of
5px, and no bottom margin, and getting rid of #fill altogether. That
should work in Firefox and hopefully also in whatever else you're
testing in.
Sep 20 '07 #4

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

Similar topics

8
by: Jukka K. Korpela | last post by:
I just noticed that most browsers render <table border="1"><tr><td><p>foo</p></td></tr></table> the same way as <table border="1"><tr><td>foo</td></tr></table> That is, they ignore the p...
5
by: The Bicycling Guitarist | last post by:
Hello folks. I thought my home page was all fine and dandy, until I looked at it with Firefox in a smaller browser window. Instead of the central graphic dropping down below the text as in MSIE (a...
5
by: Borris | last post by:
<div style="background-color: blue; width: 500px; height: 300px"> <div style="background-color: red; margin-top: 100px; margin-left: 100px; width: 300px; height: 100px"> </div> </div> Where...
8
by: Tinus | last post by:
Hello all, Because you have been so helpfull the last couple of times, I thought after testing and wasting more than 20 pages (and google-ling for 3 days :-( ). I would ask you again for your...
1
by: karanovicm | last post by:
Hi I have a problem with page margins in Firefox, it always show some white margins arround what I don't like, in IE6 everything is fine. This is part of code. ............. </head> <body...
11
by: listerofsmeg01 | last post by:
Argh! I'm going nuts trying to get a constant margin after a floated div that works cross browser. This works in IE but not Firefox: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"...
6
by: Paul Wake | last post by:
Do paragraph bottom margins overrule body margins? (To explain what I mean, http://www.xmission.com/~wake/computerrules.html has 5% margins, including the bottom margin, in IE, but not in Firefox....
1
by: luggi | last post by:
See code here: http://lsquareddesigns.com/som/collectivemedia/landing/test1.html At the bottom, as soon as i add rollovers, the margins are getting messed up but only in firefox. can someone...
14
by: Mark Shroyer | last post by:
I just noticed an unintuitive aspect of how nested blocks are positioned under a specific set of conditions, and although this is ostensibly correct behavior (unless Firefox, Safari, and Opera are...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.