Forum Moderators: open

Message Too Old, No Replies

overflow-x: hidden doesn't work with DOCTYPE included

         

dreaming of nascar

4:44 pm on Apr 14, 2003 (gmt 0)

10+ Year Member



When I include DOCTYPE on one of my pages and with it there my overflow-x: hidden does not work. I take the DOCTYPE out and everything works fine. I know that this is probably something easy, but I do not know what it is.

I tried both the HTML 4.01 strict and the transitional:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

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

Thanks

D O N

DrDoc

6:38 pm on Apr 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



well, I bet the problem is elsewhere. Have you checked the code in a validator?

[validator.w3.org...]

grahamstewart

10:50 pm on Apr 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hmm.. there is no such property as overflow-x in the CSS2 standard [w3.org].

The only thing similar is overflow [w3.org].

If its working without the doctype then it could be that it is a non-standard browser-specific extension (by Micro$oft no doubt) that gets ignored when not in 'quirks' mode.

And as DrDoc says, if it's not that, then it's something else ;)

DrDoc

11:06 pm on Apr 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



overflow-x (and y) are IE specific...

However, it should still work, no matter if it's in "quirks mode" or not, especially since a Transitional DTD would trigger quirks mode too.

What are you using the overflow control on? I mean, the type of element?

grahamstewart

11:19 pm on Apr 14, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Using the complete transitional doctype doesn't trigger quirks mode, at least not according to Zeldman at A List Apart [alistapart.com]

A recent DOCTYPE that includes a full URI (a complete web address) tells these browsers to render your page in standards–compliant mode, treating your (X)HTML, CSS, and DOM as you expect them to be treated.

Using an incomplete or outdated DOCTYPE—or no DOCTYPE at all—throws these same browsers into “Quirks” mode, where the browser assumes you’ve written old-fashioned, invalid markup and code per the depressing industry norms of the late 1990s.

As far as I know, the transitional doctype just allows you to continue using visual formatting elements and attributes in your html documents (such as align="center", valign etc).