• Advertisement
Sign in to follow this  

[web] Doctype breaks my css

This topic is 3230 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. This is the base64 of a snippet of HTML which demonstrates the desired effect of my CSS:
PGh0bWw+PGhlYWQ+CgkJPHRpdGxlPkZvbzwvdGl0bGU+CjwvaGVhZD4KPGJvZHk+CjxkaXY+Cgk8
ZGl2IHN0eWxlPSJ3aWR0aDozMDBweDtoZWlnaHQ6MTAwJTtmbG9hdDpyaWdodDtiYWNrZ3JvdW5k
OnJlZCI+CgkJJm5ic3A7Cgk8L2Rpdj4KCTx1bD4KCQk8bGk+U2VkIHV0IHBlcnNwaWNpYXRpcywg
dW5kZSBvbW5pcyBpc3RlIG5hdHVzIGVycm9yIHNpdCB2b2x1cHRhdGVtIGFjY3VzYW50aXVtIGRv
bG9yZW1xdWUgbGF1ZGFudGl1bSwgdG90YW0gcmVtIGFwZXJpYW0gZWFxdWUgaXBzYSwgcXVhZSBh
YiBpbGxvIGludmVudG9yZSB2ZXJpdGF0aXMgZXQgcXVhc2kgYXJjaGl0ZWN0byBiZWF0YWUgdml0
YWUgZGljdGEgc3VudCwgZXhwbGljYWJvLjwvbGk+CgkJPGxpPlNlZCB1dCBwZXJzcGljaWF0aXMs
IHVuZGUgb21uaXMgaXN0ZSBuYXR1cyBlcnJvciBzaXQgdm9sdXB0YXRlbSBhY2N1c2FudGl1bSBk
b2xvcmVtcXVlIGxhdWRhbnRpdW0sIHRvdGFtIHJlbSBhcGVyaWFtIGVhcXVlIGlwc2EsIHF1YWUg
YWIgaWxsbyBpbnZlbnRvcmUgdmVyaXRhdGlzIGV0IHF1YXNpIGFyY2hpdGVjdG8gYmVhdGFlIHZp
dGFlIGRpY3RhIHN1bnQsIGV4cGxpY2Fiby48L2xpPgoJCTxsaT5TZWQgdXQgcGVyc3BpY2lhdGlz
LCB1bmRlIG9tbmlzIGlzdGUgbmF0dXMgZXJyb3Igc2l0IHZvbHVwd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gaW52ZW50b3JlIHZlcml0YXRpcyBldCBxdWFzaSBhcmNoaXRlY3RvIGJlYXRh
ZSB2aXRhZSBkaWN0YSBzdW50LCBleHBsaWNhYm8uPC9saT4KCTwvdWw+CjwvZGl2PgoKPC9ib2R5
Pgo8L2h0bWw+Cg==
It renders correctly in Firefox as a space-filling rectangle on the right, the height of the whole page, with the text flowing up against it. Now, if I add the "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" doctype to this, the rectangle's height collapses to one line. Why doesn't this work under standards compliance? And is there an easy cross-platform fix?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement