Monday, December 01, 2008
« MNUG – Introduction to Silverlight 2 – O... | Main | *.svc Files Return 404 Page Not Found on... »

By default, Firefox uses a dotted rectangle to indicate that an object element has focus. Since Silverlight is implemented using the object tag, it also "suffers" from this behavior. To remove this focus rectangle, simply include the following definition in your CSS:

Here's the pretty version:

 

Does anyone have a good way to paste code into Word 2007 such that when the post is published, the code remains intact? Here's what I'm getting (which is close, but not perfect)

   

object:focus {

    outline: none;

}

Monday, December 01, 2008 5:58:12 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 
Saturday, February 21, 2009 11:08:22 PM (Central Standard Time, UTC-06:00)
Be careful not to let Accessibility suffer. Alternatively, you can change the color of the outline so that it's less harsh. You would do that with outline:1px dotted #999;

Additionally, you could just target the classname of the object like this: .mySilverlight:focus { ... }

Accessibility guidelines require things with :focus to have some sort of indication that it's in focus. That can mean a different background color, or an underline, or a border even. Just something.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):