Answered by:
changing font color in a table

Question
-
hi
I created a solution in sp2010 using vs2010. that is basically student result table. After Deployed the solution i saw the font color in that table was black i want to change the color of the table . Can i use spdesigner or anyother method . How to change the color
Can anybody help me please.
Thank you
With Regards
Monday, October 31, 2011 4:27 AM
Answers
-
Adding to Milan Chauhan solution. You simply need to add the CSS to the HTML piece of code.
protected override void CreateChildControl()
{
this.controls.add(new literalcontrol("<table style='color:red'></table>"));
}
The Color:Red will do magic for you.
thanks
ASP.NET and SharePoint developer
Company: http://www.rampgroup.com/
Blog: http://praveenbattula.blogspot.com- Proposed as answer by Sjoukje ZaalMVP Tuesday, November 1, 2011 7:52 AM
- Marked as answer by Zizhuoye Chen Sunday, November 6, 2011 10:33 AM
Tuesday, November 1, 2011 2:47 AM
All replies
-
- Proposed as answer by Ravi S Kulkarni Monday, October 31, 2011 5:14 AM
Monday, October 31, 2011 4:49 AM -
Thanks Milan. I want to change the text color .
Instead of border-color can i give font-color
thanx
Monday, October 31, 2011 10:16 PM -
Here's a list of the styles for web parts. If you use these styles in your tables then your web part will maintain the look and feel of the user's master page and theme. You can also use these styles to change the appearance of any web part.
http://techtrainingnotes.blogspot.com/2011/06/sharepoint-2010-add-colors-borders-and.html
Also take a look at this great resource from Heather Solomon:
http://sharepointexperience.com/csschart/csschart.html
Mike Smith TechTrainingNotes.blogspot.comMonday, October 31, 2011 10:25 PM -
Adding to Milan Chauhan solution. You simply need to add the CSS to the HTML piece of code.
protected override void CreateChildControl()
{
this.controls.add(new literalcontrol("<table style='color:red'></table>"));
}
The Color:Red will do magic for you.
thanks
ASP.NET and SharePoint developer
Company: http://www.rampgroup.com/
Blog: http://praveenbattula.blogspot.com- Proposed as answer by Sjoukje ZaalMVP Tuesday, November 1, 2011 7:52 AM
- Marked as answer by Zizhuoye Chen Sunday, November 6, 2011 10:33 AM
Tuesday, November 1, 2011 2:47 AM