Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a list of links stored in a Sharepoint List, and have them displayed in the standard list-item-displaying web part. I would like to have this web part formatted (perhaps with CSS) in a custom manner, while still maintaining the link to the underlying Sharepoint List. I understand that I could achieve this goal by creating a web part from scratch, but I am wondering if there is a way to get this done through the out of the box web part?

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

You have different ways to do this.

The cleanest one would be to modify the xslt attached to your Web Part. This can be done via the user interface in SP 2010, in SP 2007 you would need SharePoint Designer. You'll be able to apply simple formattng or conditional formatting.

If the formatting is part of your page/site branding, then Ryan's suggestion works just fine. You can include additional css on a specific page via a Content Editor Web Part, or add a custom stylesheet to your Master page.

share|improve this answer
    
I have SP 2010 Foundations (should be upgrading soon), and I am unable to find the XSLT editing function via the web user interface. I'm assuming it's probably available in the Enterprise Edition. With respect to using CSS, I have been unable to find a way to add an additional CSS class to the sections of the web part. Can you point me in the right direction? –  nfw Jul 7 '11 at 16:55
    
You cannot directly edit the xslt from the UI, you would need SharePoint Designer. What you can do is write your own xslt, then via the UI link your Web Part to it (Edit Web Part, then look under the Miscellaneous section). As for css, you could include the styles in the xslt, either directly to the elements or through a class that is defined in a separate stylesheet). –  Christophe Jul 8 '11 at 14:46
add comment

You can absolutely apply branding to OOB links lists. Use IE developer tools or Firefox+Firebug to select the link elements, this will give you the CSS classes used - you can then apply these classes in your own stylesheet with your own styles.

share|improve this answer
    
If I understand your suggestion, I should extend the CSS classes already used in the web part, and just apply the formatting I need? Seems simple enough, but I would think it would be better to apply an additional CSS class to the elements. Is that possible? –  nfw Jul 7 '11 at 16:52
    
The only way that I know of to provide your own style names and not use the OOB styles is by modifying the XSL. However, yes what I was suggesting was to find the classes you need to override and put your own CSS properties in a stylesheet to override the OOB look & feel. –  Ryan dennis Jul 16 '11 at 1:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.