Last post Nov 08, 2007 09:12 PM by Krizzje
Nov 07, 2007 05:07 PM|Krizzje|LINK
Maybe this is a rookie question, but could someone please tell me if it is possible to style a webpart.
In short, I'm trying to style my webpart header so it looks nice ( you know... gradient background etc... [:D] ), but I'm not quite sure if it is possible in a webpart, and if it's possible, could it be done by css or something like that?
Nov 07, 2007 07:12 PM|vinz|LINK
Yes, you can style the header of your webpart by setting the PartTitleStyle or using CSS to achieve that. You can even use image for your header background if you like.
Nov 08, 2007 11:29 AM|realistic|LINK
Yes but it's not always straight forward. I'm assming that you are trying to add a web part to SharePoint. By default, you need to modify the look and feel of a webpart using C#. To make it easier to control look and feel, you can install a webpart called
"Smart Part" (see http://www.smartpart.info/default.aspx). It allows you to insert a user control with all it's look and feel properties as a web part. It acts as a wrapper around a user control and makes
web part design much easier since you can use all the GUI tools of Visual Studio to design your user control. If you are controling the look of your user control using CSS, just make sure to include the CSS file in the same folder as the user control on deployment.
I hope that helped ...
Nov 08, 2007 09:12 PM|Krizzje|LINK
Thanks, both of the answers helped me out greatly... I'm at first trying to use my webpart in my own asp.net page webpartzone's and there I came to the styling issue, but my webparts have to work in a sharepoint environment at due time, and now I know how
to get it to work there a bit easier.. :)
Thanks again :)