Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Styling custom web parts

  Asked By: Martin Stevens         Date: Dec 20, 2007      Category: Sharepoint      Views: 282
 

As I understand it if you put a custom web part on a web part page it
will take the styling from the page. So the colouring of the title bar
for instance will be taken from the page it sits in.

How do I change these styles? is it in the master page and if so could
someone point me to directions as to how to do this. Examples would be
great.

Tagged:        

 

1 Answer Found

 
Answer #1       Answered By: Chelsey Watts          Answered On: Dec 20, 2007       

The styling  is all applied via cascading style sheets (CSS). The
primary CSS is called Core.css. The easiest way to change  this would be
to create your own Theme (a collection of graphics and css files) by
copying one of the Theme directories in the 12 hive and making your
changes to the CSS files there. Then apply the theme. A second
possiblility is to add your own custom  CSS file to the 12 hive and apply
it to the pages by pointing the AlternateCSSUrl property at your CSS
file. You can either set that property in the ONET.XML <Project>
element of a custom site definition or set the property of the Web
object programmatically. Either of these take a bit more work, but
allow more global management of the CSS file once its done.

 
Didn't find what you were looking for? Find more on Styling custom web parts Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].