Page 1 of 1
Any adverse effects to giving 'haslayout' to elements w/out?
Posted: Thu Sep 06, 2007 4:00 pm
by Luke
Sorry for the lame title, but I couldn't find a way to fit it all in without making it half of a question. My question is... I am creating a sort of front-end framework with javascript and css that both fixes a lot of IE stupidity as well as takes care of a lot of things that often annoy me about css or things that I find myself doing very often. I am wondering if there are any adverse effects to finding out which elements do not "haslayout" in IE and giving them layout by default by applying zoom:1 or a width or something else by default. Is there any reason I would want something to not "haslayout"?
Posted: Fri Sep 07, 2007 7:40 pm
by JAB Creations
Use
conditional comments...
Code: Select all
<!--[if lt IE 7]>
<style type="text/css">
#content {
margin: 20px 0px 0px 2%;
}
</style>
<![endif]-->
The above example will apply to IE 5.0-6.0 but not 7.0 or greater. Conditional comments are present in IE 5.0+ on Windows only. Keep in mind if you're running multiple standalone IE's the conditional comments will be based on your system's IE. My system's IE is 6.0 so I use an emulator for XP/7.0 as my standalone IE7 on the non-emulated XP/base will think based on XP's registry that it's IE 6.0.
My IECCSS tutorial places your IE specific CSS in to it's own stylesheet. Why create a whole new framework when one already exists? There are only a very few bugs you can't get around (mostly ones dependent on my specific layouts).
Have a basic (X)HTML/CSS layout? Post it here and I'll help you fix it for IE.
Posted: Mon Sep 10, 2007 10:35 am
by Luke
Thanks for the response, JAB! I believe you misunderstood my question though. Let me explain a little better...
My frontend framework is going to be kind of like a combination between a javascript framework (although mine will consist of only plugins for jquery) that make IE behave like a standards-compliant browser ( somewhat like
http://dean.edwards.name/IE7/ ) and a set of common css rules that I use no matter what site I'm making. I have no problem doing site layout, but thanks for the offer there. When I asked if giving all elements "layout" would cause any kind of issues, I meant would it cause any kind of issues within IE not within standards-compliant browsers. I know about IE conditionals.
Once again, what I am asking is will I have any adverse or unexpected results (within IE) from giving "haslayout" to all elements that don't have it, but should? Is there a reason for an element to not "haslayout"?