By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,739 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,739 IT Pros & Developers. It's quick & easy.

Top margin unwanted

P: n/a
On http://www.fantafiction.com/forum/index.php there is a gap, but I don't
really want it. Actually I don't want it at all. It's a discussion forum using
phpBB. So if anyone has any experience in implementing phpBB, and has
tips and tricks to share....

--
Torbjørn Pettersen
Editor/Webmaster
FantaFiction

www.fantafiction.com
Jul 20 '05 #1
Share this Question
Share on Google+
29 Replies


P: n/a
I am a back-end programmer by trade (so take everything I write with a grain
of salt), but I think you can specify the positioning of the page contents
with div tags.

<DIV STYLE="position:absolute; top:0px; left:0px;">

You can "probably" do something like:

echo "<DIV STYLE=\"position:absolute; top:0px; left:0px;\">";

<Current page content>

echo "</DIV>
I am definatly NOT SURE about this... but never-the-less, I think a div tag
is the key.

Hope this helps,
Sean
"Torbjørn Pettersen" <tpe AT broadpark DOT no> wrote in message
news:40********@news.broadpark.no...
On http://www.fantafiction.com/forum/index.php there is a gap, but I don't
really want it. Actually I don't want it at all. It's a discussion forum using phpBB. So if anyone has any experience in implementing phpBB, and has
tips and tricks to share....

--
Torbjørn Pettersen
Editor/Webmaster
FantaFiction

www.fantafiction.com

Jul 20 '05 #2

P: n/a
"Sean Berry" <se********@cox.net> wrote:
I am a back-end programmer by trade (so take everything I write with a grain
of salt), but I think you can specify the positioning of the page contents
with div tags.

<DIV STYLE="position:absolute; top:0px; left:0px;">


Please don't give any "advice" anymore about html/css, ever.

--
Spartanicus
Jul 20 '05 #3

P: n/a
simple fix ......

<body topmargin=0 marginheight=0>

It will work with both Internet Explorer and Netscape..

--
JAMES HUNT
"Torbjørn Pettersen" <tpe AT broadpark DOT no> wrote in message
news:40********@news.broadpark.no...
On http://www.fantafiction.com/forum/index.php there is a gap, but I don't
really want it. Actually I don't want it at all. It's a discussion forum using phpBB. So if anyone has any experience in implementing phpBB, and has
tips and tricks to share....

--
Torbjørn Pettersen
Editor/Webmaster
FantaFiction

www.fantafiction.com

Jul 20 '05 #4

P: n/a
On Mon, 14 Jun 2004 07:50:51 -0600, James Hunt
<ja************@hotmail.com> wrote:
simple fix ......

<body topmargin=0 marginheight=0>

It will work with both Internet Explorer and Netscape..


'both'... there are more browser nowadays.

This will work in any graphical browser released after 2000 except
Netscape 4.x:

body {margin: 0; padding: 0;}

(in the page stylesheet)

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #5

P: n/a
On Mon, 14 Jun 2004 07:50:51 -0600, James Hunt
<ja************@hotmail.com> wrote:
simple fix ......

<body topmargin=0 marginheight=0>

It will work with both Internet Explorer and Netscape..

And it's invalid markup at least back to HTML 3.2. marginheight is valid
in framesets, topmargin is not at all recommended for WWW authoring.

Please don't advise this. It makes as much sense as advising someone to
replace their car bumper with paper mache.
Jul 20 '05 #6

P: n/a
James Hunt wrote (not surprisingly, in TOFU format):
simple fix ......

<body topmargin=0 marginheight=0>
This isn't valid HTML in any version (2.0, 3.2, 4.0, XHTML 1.0, XHTML 1.1).
Put simply, it's garbage that should be treated as though it doesn't exist.
This is why browsers now use CSS, because with clutter like this all
through an HTML document, it would be
It will work with both Internet Explorer and Netscape..


First, the Navigator browser is no longer being released under the Netscape
trademark. Second, there are dozens of browsers *besides* Internet Explorer
(if you even call something a browser which is really a protocol engine
that is flagrantly incompatible with standard HTTP which connects to a
parsing engine that is flagrantly incompatible with standard HTML and a
style engine that is egregiously incompatible with standard CSS) and
Mozilla (which is the same code as the Netscape branded Navigator).

Oh, after you get a clue about HTML, learn how to quote.

--
Shawn K. Quinn
Jul 20 '05 #7

P: n/a
"topmargin" is from the initial proposal for the JavaScript based style
sheets back in 96. By adding it to the <body> you are eliminating the need
for adding anything to the <STYLE>. If "topmargin" is invalid then it would
not work. However, it does work with the most commonly used browsers
(Internet Explorer, Mozilla, Netscape, and Opera). If there is a browser
that it does not work with please tell me.

Looking at the page in reference I can see why one would not want to use
this method.

It would be easier to simply add to the existing stylesheet
templates/subSilver/subSilver.cssLine 11 margin: 0;
--
JAMES HUNT

"Neal" <ne*****@yahoo.com> wrote in message
news:op**************@news.individual.net...
On Mon, 14 Jun 2004 07:50:51 -0600, James Hunt
<ja************@hotmail.com> wrote:
simple fix ......

<body topmargin=0 marginheight=0>

It will work with both Internet Explorer and Netscape..

And it's invalid markup at least back to HTML 3.2. marginheight is valid
in framesets, topmargin is not at all recommended for WWW authoring.

Please don't advise this. It makes as much sense as advising someone to
replace their car bumper with paper mache.

Jul 20 '05 #8

P: n/a
James Hunt wrote:
"topmargin" is from the initial proposal for the JavaScript based
style sheets back in 96.
....which was never accepted as a recommendation by anyone, but rather
was a(nother) attempt by Netscape to enforce its "extensions" (spit)
onto the www regardless of the consquences.
By adding it to the <body> you are eliminating the need for adding
anything to the <STYLE>.
Nothing like turning an advantage on its head.
If "topmargin" is invalid then it would not work.


This post is getting funnier by the second.

BTW, kindly look up "top posting" in Google. And when you learn what
it is, be even kinder in not doing it here.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #9

P: n/a
On Mon, 14 Jun 2004 19:02:22 -0600, James Hunt
<ja************@hotmail.com> wrote:
If "topmargin" is invalid then it would
not work.


Bzzzzt. Sorry, you lose. But here's a copy of our home game...

http://validator.w3.org/docs/help.ht...idation_basics
Jul 20 '05 #10

P: n/a

"Shawn K. Quinn" <sk*****@xevious.kicks-ass.net> wrote in message
news:Xp********************@speakeasy.net...
James Hunt wrote (not surprisingly, in TOFU format):
simple fix ......

<body topmargin=0 marginheight=0>
This isn't valid HTML in any version (2.0, 3.2, 4.0, XHTML 1.0, XHTML

1.1). Put simply, it's garbage that should be treated as though it doesn't exist. This is why browsers now use CSS, because with clutter like this all
through an HTML document, it would be

According to the O'Reilly HTML Definitive Guide TOPMARGIN was valid for HTML
2.0
and continues to be valid as per the latest publication in 2002.
It will work with both Internet Explorer and Netscape..


First, the Navigator browser is no longer being released under the

Netscape trademark. Second, there are dozens of browsers *besides* Internet Explorer (if you even call something a browser which is really a protocol engine
that is flagrantly incompatible with standard HTTP which connects to a
parsing engine that is flagrantly incompatible with standard HTML and a
style engine that is egregiously incompatible with standard CSS) and
Mozilla (which is the same code as the Netscape branded Navigator).

Oh, after you get a clue about HTML, learn how to quote.


I am not new to the world of HTML, thus that is why I have been using an
attribute that was introduced back in 96. It worked back then and it
continues
to work. As to validity, no this type of attribute is not valid as per W3C
Recommendations. However, becuase it does in fact work, it is by definition
"valid" code. If you find a browser that does not recognize this attribute
I will
glady recant.

It all boils down to whether or not you as the programer wishes to use:

<style type="text/css">
BODY {
margin: 0px;
}
</style>

or

<body topmargin="0">

I believe that this would be considered as a "formatting trick" which
according to
the FAQ is valid for discussion in this newsgroup.

---
James Hunt
Jul 20 '05 #11

P: n/a
"Neal" <ne*****@yahoo.com> wrote in message
news:op**************@news.individual.net...
On Mon, 14 Jun 2004 19:02:22 -0600, James Hunt
<ja************@hotmail.com> wrote:
If "topmargin" is invalid then it would
not work.


Bzzzzt. Sorry, you lose. But here's a copy of our home game...

http://validator.w3.org/docs/help.ht...idation_basics


" The process of verifying whether a document actually follows the rules for
the language(s) it uses is called validation, and the tool used for that is
a validator. A document that passes this process with success is called
valid."

This only proves my point. Whether or not something is valid is based on
the tool you use to validate it. No, this attribute is not recommended by
the W3C. I never said that it was. However, in order to display a document
a browser must interpret the document. Thus, if an attribute gives you the
results that you want and it does in fact work it is valid according the
developers of the specific browser. According to the authors of the
O'Reilly's HTML & XHTML: The Definitive Guide, 5th Edition this attribute
is valid.

---
James Hunt
Jul 20 '05 #12

P: n/a
"James Hunt" <ja************@hotmail.com> wrote:
"topmargin" is from the initial proposal for the JavaScript based style
sheets back in 96.
Are you sure? JSSS were a Netscape proposal and topmargin is a
Microsoft invention (supported by IE2+ and only _much_ later other
browsers) whilst Netscape 4 introduced support for the other bit of
clutter you suggested - marginheight.

Whilst the JSSS proposal did contain a topMargin property (and being a
JS derived language the capitalisation is important) I don't think
Microsoft were trying to support this in any way. For starters nothing
in the JSSS proposal speaks about putting JSSS styles directly as HTML
attributes and there's also the fact that IE2 predates the JSSS
proposal by ten months.
By adding it to the <body> you are eliminating the need
for adding anything to the <STYLE>.
Yes, by adding it to every <body> on every page you are eliminating
the need to add it once to a single stylesheet. Um....
If "topmargin" is invalid then it would
not work.


Rubbish. valid and invalid have a precise technical meaing in the
context of HTML and whether something works or not in some group of
browsers has nothing to do with that.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #13

P: n/a
On Tue, 15 Jun 2004, James Hunt wrote:
According to the O'Reilly HTML Definitive Guide TOPMARGIN was valid
for HTML 2.0
Just shows how much credence one can put in anything that calls itself
"definitive". HTML 2.0 is defined by RFC1866: the RFC doesn't need to
call itself "definitive", because it -is- definitive.
and continues to be valid as per the latest publication in 2002.
Come back when you have a clue...?
Oh, after you get a clue about HTML, learn how to quote.


I am not new to the world of HTML,


I couldn't possibly comment.
It worked back then and it continues to work.
Since there's no definitive statement about what it does, you have no
authoritative test against which you can make that claim.
As to validity, no this type of attribute is not valid as per W3C
Recommendations. However, becuase it does in fact work, it is by definition
"valid" code.


Oh, this is now way beyond a joke. plonk.
Jul 20 '05 #14

P: n/a
"James Hunt" <ja************@hotmail.com> writes:
[topmargin]
I am not new to the world of HTML, thus that is why I have been
using an attribute that was introduced back in 96. It worked back
then and it continues to work.
And being from 1996, has since been superceded by more maintainable
alternatives in CSS.
If you find a browser that does not recognize this attribute I will
glady recant.
Links 2 doesn't. Even in graphical mode. Though it has a default top
margin of zero anyway.

Other browsers on my system that don't support it:
- lynx
- w3m
- dillo
- chimera2
- elinks
(all, I think, the latest versions)
It all boils down to whether or not you as the programer wishes to use:

<style type="text/css">
BODY {
margin: 0px;
}
</style>

or

<body topmargin="0">


Neither, I'd put the style rule in an external stylesheet and use
<link>. Far more maintainable.

--
Chris
Jul 20 '05 #15

P: n/a
"Steve Pugh" <st***@pugh.net> wrote in message
news:3f********************************@4ax.com...
"James Hunt" <ja************@hotmail.com> wrote:
"topmargin" is from the initial proposal for the JavaScript based style
sheets back in 96.


Are you sure? JSSS were a Netscape proposal and topmargin is a
Microsoft invention (supported by IE2+ and only _much_ later other
browsers) whilst Netscape 4 introduced support for the other bit of
clutter you suggested - marginheight.

Whilst the JSSS proposal did contain a topMargin property (and being a
JS derived language the capitalisation is important) I don't think
Microsoft were trying to support this in any way. For starters nothing
in the JSSS proposal speaks about putting JSSS styles directly as HTML
attributes and there's also the fact that IE2 predates the JSSS
proposal by ten months.


Looking back in my books O'Reilly's HTML Definitive Guide shows that the
topmargin is valid for the body tag dating back to HTML 2.0. The latest
5th Edition also still has it as a Internet Explore only attribute. As to
placing the
JSSS property into the actual tag simply eliminates the need for the style
tag.
I do recall that you used to have to use topMargin= when using it in this
way.
Which is probably why the W3C never recomended it. However, now
you no longer have to put the cap on margin likewise with onLoad=.

As to how this attribute became acepted in the body tag back in the mid
90's I do not recall. But of course that was a couple of years after the
W3C
was established.

By adding it to the <body> you are eliminating the need
for adding anything to the <STYLE>.


Yes, by adding it to every <body> on every page you are eliminating
the need to add it once to a single stylesheet. Um....


I generally use Perl or php to develop my web pages thus, I only have
to use one body for multiple pages (but that is for a different news group).
If "topmargin" is invalid then it would
not work.


Rubbish. valid and invalid have a precise technical meaing in the
context of HTML and whether something works or not in some group of
browsers has nothing to do with that.


Whether or not something is valid or not is determined by what is
interpreting
the coding. In a another post Neal give me a a link to the W3C definition
of
validity that said the very same thing.

If you use the W3C Recommendations then no it is not considered
valid, however, this does not mean that the coding is invalid. HTML
is a programming language like any other language and it will continue
to be that way until W3C can get browser developers to adhere to
their recommended standards.

---
James Hunt
Jul 20 '05 #16

P: n/a
"Chris Morris" <c.********@durham.ac.uk> wrote in message
news:87************@dinopsis.dur.ac.uk...
If you find a browser that does not recognize this attribute I will
glady recant.


Links 2 doesn't. Even in graphical mode. Though it has a default top
margin of zero anyway.

Other browsers on my system that don't support it:
- lynx
- w3m
- dillo
- chimera2
- elinks
(all, I think, the latest versions)


Thank you very much, I recant me suggestion then.
It all boils down to whether or not you as the programer wishes to use:

<style type="text/css">
BODY {
margin: 0px;
}
</style>

or

<body topmargin="0">


Neither, I'd put the style rule in an external stylesheet and use
<link>. Far more maintainable.


I fully agree if I were to use the <style> I would use the external over an
internal any day.

---
James Hunt
Jul 20 '05 #17

P: n/a
"James Hunt" <ja************@hotmail.com> writes:
HTML is a programming language like any other language


Wrong. HTML is a markup language, not a programming language. It has
no variable storage, no commands, no functions, and can neither be
executed nor compiled. It is a data format.

--
Chris
Jul 20 '05 #18

P: n/a
"James Hunt" <ja************@hotmail.com> wrote:
"Steve Pugh" <st***@pugh.net> wrote in message
news:3f********************************@4ax.com.. .
"James Hunt" <ja************@hotmail.com> wrote:
>"topmargin" is from the initial proposal for the JavaScript based style
>sheets back in 96.
Are you sure? JSSS were a Netscape proposal and topmargin is a
Microsoft invention (supported by IE2+ and only _much_ later other
browsers) whilst Netscape 4 introduced support for the other bit of
clutter you suggested - marginheight.

Whilst the JSSS proposal did contain a topMargin property (and being a
JS derived language the capitalisation is important) I don't think
Microsoft were trying to support this in any way. For starters nothing
in the JSSS proposal speaks about putting JSSS styles directly as HTML
attributes and there's also the fact that IE2 predates the JSSS
proposal by ten months.


Looking back in my books O'Reilly's HTML Definitive Guide shows that the
topmargin is valid for the body tag dating back to HTML 2.0.


Your book is wrong. The HTML 2.0 spec is freely available from
http://www.rfc-editor.org/rfc/rfc1866.txt and does not contain this
attribute.
The latest
5th Edition also still has it as a Internet Explore only attribute.
Which is also wrong, Netscape 6+ and Opera 7+ also support this
non-standard attribute.
As to placing the JSSS property into the actual tag simply eliminates
the need for the style tag.
Why just these four properties (topMargin, leftMargin, bottomMargin,
rightMargin) ? Why are none of the other JSSS properties used as HTML
attributes?

Why are these attributes not supported by the only browser ever to
support JSSS (Netscapoe 4.x) ?

Sorry, I just don't buy it - support for this attribute predates JSSS
by almost a year and comes from the oppossing manufacturer in the then
heated browser wars.
I do recall that you used to have to use topMargin= when using it in this
way.
Then you recall wrong. HTML has always been case insensitive. The JSSS
property would have been case sensitive because JSSS was written with
JavaScript syntax not HTML syntax, but <body margintop="0"> is not
JSSS, it's just non-standard HTML.
Which is probably why the W3C never recomended it.
Which it? JSSS or this non-standard HTML? They preferred CSS over JSSS
as a whole, and they preferred stylesheets over presetational HTML at
least since HTML 4.0 / CSS1.
However, now
you no longer have to put the cap on margin likewise with onLoad=.
You never needed to. Fire up Netscape 2 and try it yourself. In HTML
the event handler is totally case insensitive. Indeed when referenced
in JavaScript the only correct way to write the event handler is all
lower case - onload.
As to how this attribute became acepted in the body tag back in the mid
90's I do not recall. But of course that was a couple of years after the
W3C was established.
Microsoft introduced it as an extension to HTML supported by IE2, this
was in late 1995. JSSS, which just happened to have a property with a
similar name, was proposed by Netscape in 1996. JSSS died. Later
Nertscape 6 and Opera 7 added support for the non-standard HTML
attribute. Apart from playing a part in killing JSSS the W3C has
nothing to do with the sequence of events.
> By adding it to the <body> you are eliminating the need
>for adding anything to the <STYLE>.


Yes, by adding it to every <body> on every page you are eliminating
the need to add it once to a single stylesheet. Um....

I generally use Perl or php to develop my web pages thus, I only have
to use one body for multiple pages (but that is for a different news group).


But your users need to download the bloated <body> code for every page
rather than download one style declaration for the whole site.
>If "topmargin" is invalid then it would not work.


Rubbish. valid and invalid have a precise technical meaing in the
context of HTML and whether something works or not in some group of
browsers has nothing to do with that.


Whether or not something is valid or not is determined by what is
interpreting the coding.


Not in the context of HTML. Valid means that it follows the formal
grammar laid out in the DTD. Nothing more and nothing less. Any other
use of the word valid, whilst valid (sorry) according to English
usage, is simply misleading whee applied to HTML.
If you use the W3C Recommendations then no it is not considered
valid, however, this does not mean that the coding is invalid.
See what I mean about misleading?
HTML is a programming language


No it isn't.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #19

P: n/a
"Steve Pugh" <st***@pugh.net> wrote in message
news:7c********************************@4ax.com...
"James Hunt" <ja************@hotmail.com> wrote:


[snip]

Thanks for the response. It has cleared up a lot. Because of your response
I do have a better grasp on current HTML standards. And like wise I will
begin to weed out my "invalid" coding.

---
James Hunt
Jul 20 '05 #20

P: n/a
Steve Pugh wrote:
"James Hunt" <ja************@hotmail.com> wrote:

[snip]
HTML is a programming language


No it isn't.


Chuckle! I keep seeing this argument, and suspect that neither side has the
same view of "programming language" as I do.

First, I suspect that people saying that it isn't a programming language have
a narrower view of what that means. Perhaps they mean it isn't a "procedural
language"? But I would include logic & declarative languages in the term. And
logic programming, for example using Prolog, can be much stranger than HTML.

Second, I suspect that some people claiming it is a programming language think
of tags as instruction codes? Bad view.

But when I am trying to work out what will become of my pages, it appears to
be a perfectly sensible approach to "dry-check" how a user agent will handle
the document tree. It takes the next element, finds all the qualifiers, then
adds it to the current process state. I find it hard to work out how floated
elements on my pages will be rendered without doing this sort of analysis. The
W3C's visual formatting models are typically based on the effects of a
sequence of bits of processing. And "sequence" is important. It isn't enough
that paragraphs are properly marked-up. They need to be rendered in the right
sequence too.

It isn't a computationally complete programming language. It is a highly
specialised emulated language. (I once devised a language, which I would claim
was a programming language, for performing error recovery on magnetic tapes.
HTML is "just" another like that).

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #21

P: n/a

"James Hunt" <ja************@hotmail.com> wrote in message
news:3v********************@comcast.com...
"Neal" <ne*****@yahoo.com> wrote in message
news:op**************@news.individual.net...
On Mon, 14 Jun 2004 19:02:22 -0600, James Hunt
<ja************@hotmail.com> wrote:
If "topmargin" is invalid then it would
not work.
Bzzzzt. Sorry, you lose. But here's a copy of our home game...

http://validator.w3.org/docs/help.ht...idation_basics


" The process of verifying whether a document actually follows the rules

for the language(s) it uses is called validation, and the tool used for that is a validator. A document that passes this process with success is called
valid."

This only proves my point. Whether or not something is valid is based on
the tool you use to validate it.
Perhaps you need to read your own citation again
"The process of verifying whether a document actually follows the rules for
the language(s) it uses is called validation"

The keywords are "verifying whether a document follows the rules for the
language it uses"
In other words, in order to be valid, it must follow the rules of the
language.
In this case, the language is HTML.
Who writes the rules? The W3C.
Following the "rules" of the language, as established by the W3C is the
determining factor of whether the document is valid.

"Validity" has absolutely NOTHING to do with whether or not a browser(s)
will render the document as intended.
No, this attribute is not recommended by
the W3C. I never said that it was.
Then it cannot be "valid"
According to the authors of the
O'Reilly's HTML & XHTML: The Definitive Guide, 5th Edition this attribute
is valid.


Did O'Reilly's Publishing develop Hypertext Markup Language?
NO, the W3C did.
Who do you think would be the primary resource for all HTML knowledge?
O'Reilly's Publishing, or the W3C?

-Karl
Jul 20 '05 #22

P: n/a
"James Hunt" <ja************@hotmail.com> wrote:
...continues to be valid as per the latest publication in 2002.


Something rather oxymoronic about that.

--/<eith
Jul 20 '05 #23

P: n/a
James Hunt wrote:
According to the O'Reilly HTML Definitive Guide TOPMARGIN was valid
for HTML 2.0 and continues to be valid as per the latest
publication in 2002.
Topmargin is valid, you say?
As to validity, no this type of attribute is not valid as per W3C
Recommendations.
Oh, wait, it is not valid. Um, which is it?
However, becuase it does in fact work, it is by definition "valid"
code.
Please get a clue and learn what "valid" means in the context of HTML.
If you find a browser that does not recognize this attribute I will
glady recant.


Lynx. Now recant as you promised.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #24

P: n/a
James Hunt wrote:
Looking back in my books O'Reilly's HTML Definitive Guide shows
(A book on HTML is not the "definitive" guide for what is or is not in
any particular version.)
that the topmargin is valid for the body tag dating back to HTML
2.0.
Here's the HTML 2.0 spec:

http://ftp.ics.uci.edu/pub/ietf/html/rfc1866.txt

Please find "topmargin" in there and tell us all where it is.
Whether or not something is valid or not is determined by what is
interpreting the coding.
Of course it isn't. It is determined by whether it matches a doc type
definition. And the dtd for HTML 2.0 does not include topmargin.
If you use the W3C Recommendations then no it is not considered
valid
Of course not, since no dtd in any w3c recommendation includes topmargin.
however, this does not mean that the coding is invalid.
<sigh>
The only way topmargin can be valid is if you write your own dtd.
HTML is a programming language


No, it is a markup language.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #25

P: n/a
Torbjørn Pettersen (I) wrote...
On http://www.fantafiction.com/forum/index.php there is a gap, but I don't
really want it. Actually I don't want it at all. It's a discussion forum using
phpBB. So if anyone has any experience in implementing phpBB, and has
tips and tricks to share....


OK, nice discussion. But.... would any of those who actually <em>do</em>
have a clue here care to enlighten me as to what would work? What doesn't
work isn't really very helpful you know. ;-)

Torbjørn
Jul 20 '05 #26

P: n/a
/Torbjørn Pettersen/:
Torbjørn Pettersen (I) wrote...
On http://www.fantafiction.com/forum/index.php there is a gap, but I don't
really want it. Actually I don't want it at all. It's a discussion forum using
phpBB. So if anyone has any experience in implementing phpBB, and has
tips and tricks to share....


OK, nice discussion. But.... would any of those who actually <em>do</em>
have a clue here care to enlighten me as to what would work? What doesn't
work isn't really very helpful you know. ;-)


But I didn't really understand where's that/which gap you're about?

--
Stanimir
Jul 20 '05 #27

P: n/a
"Torbjørn Pettersen" <tpe AT broadpark DOT no> wrote:
Torbjørn Pettersen (I) wrote...
On http://www.fantafiction.com/forum/index.php there is a gap, but I don't
really want it. Actually I don't want it at all. It's a discussion forum using
phpBB. So if anyone has any experience in implementing phpBB, and has
tips and tricks to share....


OK, nice discussion. But.... would any of those who actually <em>do</em>
have a clue here care to enlighten me as to what would work? What doesn't
work isn't really very helpful you know. ;-)


body {margin-top: 0; padding-top: 0;}
will do the trick in all modern browsers, even IE.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #28

P: n/a
James Hunt wrote:

"Shawn K. Quinn" <sk*****@xevious.kicks-ass.net> wrote in message
news:Xp********************@speakeasy.net...
James Hunt wrote (not surprisingly, in TOFU format):
> simple fix ......
>
> <body topmargin=0 marginheight=0>
This isn't valid HTML in any version (2.0, 3.2, 4.0, XHTML 1.0, XHTML
1.1). Put simply, it's garbage that should be treated as though it
doesn't exist. This is why browsers now use CSS, because with clutter
like this all through an HTML document, it would be


According to the O'Reilly HTML Definitive Guide TOPMARGIN was valid for
HTML 2.0 and continues to be valid as per the latest publication in 2002.


Simple fix: take your O'Reilly HTML Definitive Guide and feed it to a paper
shredder so you're not confused by blatant misinformation ever again. That
book is not worth the paper it is printed on.

O'Reilly is not a standards body; the W3C is. The topmargin attribute was
not valid in HTML 2.0.
> It will work with both Internet Explorer and Netscape..


First, the Navigator browser is no longer being released under the
Netscape trademark. Second, there are dozens of browsers *besides*
Internet Explorer (if you even call something a browser which is really a
protocol engine that is flagrantly incompatible with standard HTTP which
connects to a parsing engine that is flagrantly incompatible with
standard HTML and a style engine that is egregiously incompatible with
standard CSS) and Mozilla (which is the same code as the Netscape branded
Navigator).

Oh, after you get a clue about HTML, learn how to quote.

I am not new to the world of HTML, thus that is why I have been using an
attribute that was introduced back in 96.
If it was introduced in 1996 by whichever browser maker, it was probably
*after* the CSS level 1 recommendation (standard) was made final.

Apparently you don't know much about HTML.
It worked back then and it continues to work.
In the sense of the World Wide Web, it DOES NOT work.
As to validity, no this type of attribute is not valid as per W3C
Recommendations. However, becuase it does in fact work, it is by
definition "valid" code.
This isn't the definition of validity as it relates to HTML, not by a long
shot.
If you find a browser that does not recognize this attribute I will glady
recant.
Amaya almost certainly doesn't, without getting into the browsers that have
no reason to recognize it to begin with (Lynx for starters).
It all boils down to whether or not you as the programer wishes to use:
I don't know what programmers have to do with this. This isn't programming.
<style type="text/css">
BODY {
margin: 0px;
}
</style>


This is much better than invalid HTML (unless you're using this in an XHTML
document, in which case it won't work anymore).

--
Shawn K. Quinn
Jul 20 '05 #29

P: n/a
On Tue, 15 Jun 2004, Shawn K. Quinn wrote:
O'Reilly is not a standards body; the W3C is.


To be pedantic, the W3C is not a standards body: it's an industry
consortium. It issues Technical Recommendations (which some of its
members then studiously ignore), which are the closest we get to a
standard at this level (bearing in mind that RFC1866 was the last IETF
"standards track" specification for HTML, and that ISO HTML, which is
the only HTML specification that could *truly* rate as a "standard",
has only a specialised following.
[We now return you to your normal bogon flux...]

Jul 20 '05 #30

This discussion thread is closed

Replies have been disabled for this discussion.