Tuesday, August 30, 2011
Thursday, August 25, 2011
jquery rounded corners in IE 7-8
Please, use this plugin only if you REALLY want to have rounded corners in IE 7 and 8, because using jquery plugins to display CSS3 effects in old IE browsers wont be a wise choice.
We always try to keep our website light-weight possible and we don't want to make our website heavier only for the sake of IE.
Download source file here
We always try to keep our website light-weight possible and we don't want to make our website heavier only for the sake of IE.
Download source file here
Thursday, August 18, 2011
How to remove button's/link's dotted line on focus in firefox?
Links
a:focus{
outline: none;
-moz-outline-style: none;
}
/*for firefox:
vendor specific selectors don't work with comma(,) separated class names
we can not keep all three selectors in one line -
.button::-moz-focus-inner, a:focus, input[type="submit"]:focus, input[type="button"]:focus
*/
.button::-moz-focus-inner{
border: 0;
}
/*for IE8 */
input[type="submit"]:focus, input[type="button"]:focus
{
outline : none;
}
a:focus{
outline: none;
-moz-outline-style: none;
}
/*for firefox:
vendor specific selectors don't work with comma(,) separated class names
we can not keep all three selectors in one line -
.button::-moz-focus-inner, a:focus, input[type="submit"]:focus, input[type="button"]:focus
*/
.button::-moz-focus-inner{
border: 0;
}
/*for IE8 */
input[type="submit"]:focus, input[type="button"]:focus
{
outline : none;
}
Friday, July 29, 2011
Input type file width problem in IE and Firefox
<input type="file" size="46" style="width: 300px;" />
Note : Width works for Internet Explorer and size works for Firefox.
Note : Width works for Internet Explorer and size works for Firefox.
Friday, July 22, 2011
CSS, jquery alternate row color compatible with IE7 and IE8
CSS
.tableClass{
}
.odd { background-color: blue; }
.even { background-color: white; }
jQuery
$(function() {
//
$('.tableClass tr:even').addClass('even');
$('.tableClass tr:odd').addClass('odd');
});
.tableClass{
}
.odd { background-color: blue; }
.even { background-color: white; }
jQuery
$(function() {
//
$('.tableClass tr:even').addClass('even');
$('.tableClass tr:odd').addClass('odd');
});
jquery to find out max height of <li> (column)
var max = -1;
$(".ulClassName li").each(function() {
var h = $(this).height();
max = h > max ? h : max;
$(this).css({'min-height': max});
});
alert(max);
$(".ulClassName li").each(function() {
var h = $(this).height();
max = h > max ? h : max;
$(this).css({'min-height': max});
});
alert(max);
Thursday, June 30, 2011
Seperate CSS files for Firefox versions
Have you come across UI issues in different versions of Firefox? This was the very first time for me to have version issues with Firefox. However, we can call different CSS files for different versions of firefox using jquery/javascript -
var version=jQuery.browser.version;
if (jQuery.browser.mozilla) {
var verarray=version.split('.');
if(verarray[0]=='1' && verarray[1]=='9' && verarray[2]=='2')
{
var head= document.getElementsByTagName('head')[0];
var addCSS= document.createElement('link');
addCSS.href = 'css/CSIdentity.ff3.6.css';
addCSS.rel = 'stylesheet';
addCSS.type = 'text/css';
head.appendChild(addCSS);
}
}
var version=jQuery.browser.version;
if (jQuery.browser.mozilla) {
var verarray=version.split('.');
if(verarray[0]=='1' && verarray[1]=='9' && verarray[2]=='2')
{
var head= document.getElementsByTagName('head')[0];
var addCSS= document.createElement('link');
addCSS.href = 'css/CSIdentity.ff3.6.css';
addCSS.rel = 'stylesheet';
addCSS.type = 'text/css';
head.appendChild(addCSS);
}
}
Subscribe to:
Posts (Atom)
