Author

Topic: <!DOCTYPE HTML> vs. <!DOCTYPE HTML PUBLIC> (WTF!) (Read 842 times)

member
Activity: 119
Merit: 100
BitcoinMoxy.com
IE seems to not render a gap when the last div in the document is either left empty completely or if it just has text without another in it. Making it a floating element works, too, but then it offsets the hidden popup element differently in all browsers, causing more annoyance. Spent an hour and a half last night just fooling around with trial and error and couldn't get it fixed the way I wanted.
Huh It makes absolutely no difference on my computer using IE 8.0. Removing the spans leaves exactly the same gap. The only thing that makes any difference at all is increasing the padding/margins, which increases the size of the gap (as expected), but nothing I've tried will reduce the gap or remove it completely. I wouldn't have thought floating it would make a difference, but I never thought to try that because it'll just screw up the pop-up even if it works. I don't think there's any way to float it and still have the pop-up work the way you want.

Sent you a buck twenty.
Thanks. Grin

Updated the page. Enjoy your burrito Wink

legendary
Activity: 4536
Merit: 3188
Vile Vixen and Miss Bitcointalk 2021-2023
IE seems to not render a gap when the last div in the document is either left empty completely or if it just has text without another in it. Making it a floating element works, too, but then it offsets the hidden popup element differently in all browsers, causing more annoyance. Spent an hour and a half last night just fooling around with trial and error and couldn't get it fixed the way I wanted.
Huh It makes absolutely no difference on my computer using IE 8.0. Removing the spans leaves exactly the same gap. The only thing that makes any difference at all is increasing the padding/margins, which increases the size of the gap (as expected), but nothing I've tried will reduce the gap or remove it completely. I wouldn't have thought floating it would make a difference, but I never thought to try that because it'll just screw up the pop-up even if it works. I don't think there's any way to float it and still have the pop-up work the way you want.

Sent you a buck twenty.
Thanks. Grin
member
Activity: 119
Merit: 100
BitcoinMoxy.com
Now I don't know if you've got another 5 minutes on your hand to help me figure out why Internet Explorer still displays a gap down there (though different from the doctype case from what it looks like)...

It seems to be caused by the first element inside
.

I'll send a small token of appreciation (like a buck twenty) to you or anybody else who can get IE to align with my markup vision Smiley (unless it requires non-standard workarounds, then don't bother).
You mean the gap between the image and the bottom of the page? IE always leaves a gap between the last block and the bottom of the page, even if the block has no bottom margin or padding. I don't know how to get rid of it, sorry. I have long since given up on trying to get IE to display pages correctly. This isn't the worst violation of the HTML standard I've seen from IE, not by a long shot.

Foxpup, thanks alot for your input.
IE seems to not render a gap when the last div in the document is either left empty completely or if it just has text without another in it. Making it a floating element works, too, but then it offsets the hidden popup element differently in all browsers, causing more annoyance. Spent an hour and a half last night just fooling around with trial and error and couldn't get it fixed the way I wanted.

I'll either give it another half hour tonight or go in favour of Firefox/Chrome beauty.

Sent you a buck twenty.

legendary
Activity: 4536
Merit: 3188
Vile Vixen and Miss Bitcointalk 2021-2023
Now I don't know if you've got another 5 minutes on your hand to help me figure out why Internet Explorer still displays a gap down there (though different from the doctype case from what it looks like)...

It seems to be caused by the first element inside
.

I'll send a small token of appreciation (like a buck twenty) to you or anybody else who can get IE to align with my markup vision Smiley (unless it requires non-standard workarounds, then don't bother).
You mean the gap between the image and the bottom of the page? IE always leaves a gap between the last block and the bottom of the page, even if the block has no bottom margin or padding. I don't know how to get rid of it, sorry. I have long since given up on trying to get IE to display pages correctly. This isn't the worst violation of the HTML standard I've seen from IE, not by a long shot.
member
Activity: 119
Merit: 100
BitcoinMoxy.com
You were absolutely correct about the doctype declaration. It was Chrome indeed which displayed the page as I wanted but not according to specifications. Which is what caused the confusion.

Thank you very much.


Now I don't know if you've got another 5 minutes on your hand to help me figure out why Internet Explorer still displays a gap down there (though different from the doctype case from what it looks like)...

It seems to be caused by the first element inside
.

I'll send a small token of appreciation (like a buck twenty) to you or anybody else who can get IE to align with my markup vision Smiley (unless it requires non-standard workarounds, then don't bother).


Regards

legendary
Activity: 4536
Merit: 3188
Vile Vixen and Miss Bitcointalk 2021-2023
And (no gap, as it should be):
This is not a valid DOCTYPE. PUBLIC must be followed by both a public and system identifier (eg, http://www.w3.org/TR/html4/strict.dtd">). Without a valid DOCTYPE, your browser may take it upon itself to "correct" any irregularities in your markup (even if your markup is syntactically valid).

For example, in Firefox, your body's 0 px margin is not always inherited by other elements. Whereas, if you had used a valid DOCTYPE, your body's margin will be inherited, resulting in all elements which don't specify their own margin to have a 0 px margin instead of the default margin, which is what's screwing up your spacing (in reality, it's not screwed up at all: it's exactly what you asked for, even though it's not what you meant). At least, that's what's happening in Firefox. Other browsers may correct your markup in different ways, resulting in your page appearing different in different in different browsers.

TL;DR: If you use (or any other valid DOCTYPE), your browser will display exactly what your markup specifies. If this differs from what you wanted or expected, there is a bug in your markup.
If you use (or any other invalid DOCTYPE), your browser will attempt to fix such bugs, resulting in your page looking correct even if it is not. However, this is not valid and your page is likely to look different (and may even look worse than if the bug was not fixed at all) in different browsers.
member
Activity: 119
Merit: 100
BitcoinMoxy.com
I just encountered a weird thing (not aliens).


I wasn't giving this much attention until the final stages of cleaning up the markup of my site, having decided to go fully HTML5 (which I believe was the right decision).

Quoting from the web as referenced to by Wikipedia:

Quote
Since web browsers are implemented with special-purpose HTML parsers, rather than general-purpose DTD-based parsers, they don't use DTDs and will never access them even if a URL is provided. The DOCTYPE is retained in HTML5 as a "mostly useless, but required" header only to trigger "standards mode" in common browsers.
(from http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#the-doctype)

Using as recommended by the W3C produced a glitch in the rendering of my site which otherwise validates neatly. Coincidentally adding the PUBLIC identifier to the DOCTYPE declaration fixed the glitch.


Here's a pic using (notice the gap at the bottom of the page, use the black square down left as a reference point):




And (no gap, as it should be):




Any HTML/Web Standards experts around who can tell me what causes this? The source was otherwise left unmodified (could be Chrome related). Just curious.

See the source/page on BitcoinMoxy.com (the info page, or any other pages have not been cleaned up yet, so it just concerns index.html)


Have a good Friday evening

Jump to:
© 2020, Bitcointalksearch.org