Sometimes z-index property defined in CSS file does not help. IE would still render some elements with bigger z-index behind elements with lower z-index.
Setting z-index using javascript fixed my z-index problem on IE.
document.getElementById('myElement').style.zIndex = "500";
Friday, June 27, 2008
Thursday, June 19, 2008
JavaScript parsing and evaluation
By default script tags are not parsed and evaluated by browsers when you try to inject them as regular text ( for example using innerHTML). Following code borrowed from mootools library will do it for you.
var myText = "html here <script>alert('javascript eval worked');</script>";
var scripts = [];
var regexp = /<script[^>]*>([\s\S]*?)<\/script>/gi;
while ((script = regexp.exec(myText))) scripts.push(script[1]);
scripts = scripts.join('\n');
if (scripts) (window.execScript) ? window.execScript(scripts) : window.setTimeout(scripts, 0);
var myText = "html here <script>alert('javascript eval worked');</script>";
var scripts = [];
var regexp = /<script[^>]*>([\s\S]*?)<\/script>/gi;
while ((script = regexp.exec(myText))) scripts.push(script[1]);
scripts = scripts.join('\n');
if (scripts) (window.execScript) ? window.execScript(scripts) : window.setTimeout(scripts, 0);
Thursday, May 29, 2008
Background problems on IE6
Sometimes IE6 would not render background specified in CSS. Try adding position:relative to the element.
#MyIe6Div {
background-color: red;
position: relative;
}
#MyIe6Div {
background-color: red;
position: relative;
}
Tuesday, May 20, 2008
Mobile Browsers
Opera Mini
http://www.operamini.com/
Pocket Web
http://www.tlogic.de/home/products.php?p=pocketweb
Minuet
http://www.triprince.com/
Ucweb
http://ucweb.com/English/
CoolBrowser
http://www.kycb-kycb.narod.ru/
http://www.operamini.com/
Pocket Web
http://www.tlogic.de/home/products.php?p=pocketweb
Minuet
http://www.triprince.com/
Ucweb
http://ucweb.com/English/
CoolBrowser
http://www.kycb-kycb.narod.ru/
Remove checkbox padding/space in IE
By default IE6 and IE7 add some space (few pixels) around the checkbox. I tried adding overflow: hidden; padding: 0px; margin: 0px; float: left; and even more - nothing helped. Only defining its height would work.
In order to remove that space try adding height and width styles
<input style="height: 1em; width: 1em;" type="checkbox">
This should work ok on IE6, IE7, Safari, FF
In order to remove that space try adding height and width styles
<input style="height: 1em; width: 1em;" type="checkbox">
This should work ok on IE6, IE7, Safari, FF
Saturday, May 17, 2008
IE6 and IE7 together on one PC
Website designers sometimes need to make sure design is OK on both IE7 and IE7. It is possible to have both IE6 and IE7 on one PC if you have one of them setup on virtual machine (either VMWare or virtual machine from Microsoft). Unfortunately, virtual machine is slow and needs a lot of additional tuning/actions.
Instead of virtual machine you could download Multiple IE pack, which allows to install IE3 to IE6 on your PC. More info here http://tredosoft.com/Multiple_IE.
I had IE7 installed on PC, and installed IE6 from above pack. Everything works just nice.
Note: about box on IE shows IE7 on my PC, but it would render page using IE6 rendering engine, so no worries.
Instead of virtual machine you could download Multiple IE pack, which allows to install IE3 to IE6 on your PC. More info here http://tredosoft.com/Multiple_IE.
I had IE7 installed on PC, and installed IE6 from above pack. Everything works just nice.
Note: about box on IE shows IE7 on my PC, but it would render page using IE6 rendering engine, so no worries.
Sunday, May 4, 2008
CSS Hacks for IE6, IE7, Firefox, Opera, Safari
CSS hacks, IE6 PNG transparency. Explanation in Russian with examples.
http://css-framework.ru/wiki/documentation/css-hack
These are for older browsers
http://www.stylegala.com/resources/css_hacks.htm
http://css-framework.ru/wiki/documentation/css-hack
These are for older browsers
http://www.stylegala.com/resources/css_hacks.htm
Subscribe to:
Posts (Atom)