/ Published in: CSS
Well, many of you are used to just replace the lack of min / max width / height for IE with fixed dimensions, right? But you don’t need to do it anymore. IE is not a strict standards browser and sometimes we can take advantage of this to code things that would be awful to see in standard CSS code.
You can, in this case, insert some IE expressions (basically, JavaScript code) to check current body width and adjust element’s width.
You can, in this case, insert some IE expressions (basically, JavaScript code) to check current body width and adjust element’s width.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#content { width: expression(document.body.clientWidth < 762? "760px" : document.body.clientWidth > 1242? "1240px" : "auto"); min-width: 760px; max-width: 1240px; }
URL: http://www.1stwebdesigner.com/css/17-css-html-effects/