Recommended

  • Silverlight.FX
    Silverlight.FX is a light-weight application framework for building RichInternet Applications with Silverlight 2.
  • Building Modular Silverlight Applications
  • Prism -  10 Things to Know
  • Securing Silverlight Application and WCF Service using ASP.Net Authentication Techniques
  • Model– View – ViewModel in Silverlight

Silverlight Hosting

Skip Navigation LinksHome / News / View News

How to Center a Silverlight App in HTML

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on Aug 26, 2009
(0 votes)
Tags: Applications , HTML , CSS
Joel Cochran explains how you can center your Silverlight App in a web page.

To accomplish this little trick I need to define a wrapper DIV in my CSS.  This Div will then wrap the entire contents of the site, so now I only have to center that DIV.  We need to define the width of the content area: it makes sense that you want to set the size of something you want to center so it can be calculated.  To do this, I set the width property of the wrapper DIV to the pixel width of my Silverlight control.

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 4 and 7 and type the answer here: