Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By uac_mickset on
In IE6 don't work property max-width when I use xhtml1-strict doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
.
If I remove this doctype - in IE6 property max-width work.
How to fix this bug without changes doctype?
Source code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php print $language ?>" xml:lang="<?php print $language ?>">
<style>
p {
border:1px solid red;
max-width:800px;
width:expression(document.body.clientWidth > 800? "800px": "auto" );
}
</style>
<body>
<p>afdddshhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhsdfffffffffffffffff ffffffffffhhhhhhhhhhhhhhhhhhhhhhhhsdfhsd fsssssssssssssssssssssssssssssssssssssssss sssssssssshhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhsddddddfffffffffffffffffffffffffffhhh</p>
</body>
</html>
Comments
ie6 does not support max-width
I'm not sure, but I do not think that Explorer 6 supports max-width. I do know for certain that it does NOT support min-width. In fact, it treats "width" as if it were "min-width".
For workaround example, see:
http://www.mezzoblue.com/archives/2004/02/25/sidestepping/
By removing the doctype declaration, you might be putting IE into "quirks mode" instead of "standards mode." This affects how Explorer interprets your CSS.
Sorry I can't provide more specific help.
IE6 support this property.
IE6 support this property. Read this article - http://www.svendtofte.com/code/max_width_in_ie/
In this article example was work, but in XHTML Strict Doctype it doesn't work :(
So time for yet another IE workaround?
I think saying that IE6 "supports" the max-width property is a bit too charitable. But that's an interesting hack; thanks for providing the link!
Sorry can't help; good luck finding a workaround. Could you send some code only to IE6 (using conditional comments) that would set a different doctype, or tell it to render in "quirks mode," or import some extra css?
may be this is solution
sure, you're right ;)
I think, I've found solution for this problem, just read this article (and see an examples - it's work) - http://www.gunlaug.no/contents/wd_additions_14.html
another hack required by IE
Cool... thanks for posting that and GOOD LUCK! IE has caused me more headaches than I care to remember. Glad that it seems this issue will be solvable.
may as well chime in...
heres my some of my hacks css for IE from a recent site... not drupal but still relevant.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
your hack is the same as
your hack is the same as I've posted in 2 links of my previous 2 posts ;)