Wednesday, 22 August 2012

adding borders to select in ie7

ha good luck with that. here is my fix.

.js file
$(document).delegate('select', 'focusin', function(){
$(this).addClass('select_focus');
    });
    $(document).delegate('select', 'focusout', function(){
$(this).removeClass('select_focus');
    });
.css file
.select_focus {  
filter:  progid:DXImageTransform.Microsoft.dropshadow(OffX=-1, OffY=0, color='black')  progid:DXImageTransform.Microsoft.dropshadow(OffX=1, OffY=0, color='black')  progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=-1, color='black')  progid:DXImageTransform.Microsoft.dropshadow(OffX=0, OffY=1, color='black');}
yeah so there you go. simple. well not really. i still have no idea what dropshadow does. but here is a link maybe you can figure it out. 
http://msdn.microsoft.com/en-us/library/ms533086(v=vs.85).aspx
also if you want to do the same think for input/textarea
.js file
$(document).delegate("input, textarea", 'focus blur', function(){
      $(this).toggleClass('focus');
    });
.css file
input.focus, textarea.focus { border: 1px solid black !important; }

0 comments:

Post a Comment