I searched high and low for a satisfactory answer to this question and failed. Hope StackOverflow can deliver me!
I am using SharePoint Foundation 2010 (my first real attempt at deep diving into SharePoint), with (among other things) a custom web part; The websiteβs homepage uses the CSS file provided by the client and which I must adhere to. The problem I am facing is that SharePoint, adding several SharePoint-specific CSS classes to the HTML structure of the web part, contradicts the client style. After some digging, I found that the ms-WPBody and its various element selectors are the main culprits.
I could add !important to everything in the client stylesheet, but this is verboten. I could insert a very dirty style into the child content of the web part, trying to override the SharePoint style, which is the course I have been following recently, but it has become messy. Or I could try to remove the class from the web part, which brings me to my question:
How can I remove or otherwise override the CSS class names inserted into the HTML structuring for the SharePoint Web Part? I donβt know the internal SharePoint work enough to find out what needs to be done to make this change, and my google-fu is not working on this. CssClass on ASP.NET web control markup is obviously ignored, probably some retention inherited from WebControl .
Help me StackOverflow! You are my only hope!
Edit
I apologize for not clarifying this before, but I would like to state that I am getting CSS and not looking for help with styling. I'm really looking for how to remove the CSS class released by SharePoint. Can anyone help there? I'm going to remove the CSS tag as this seems to confuse people. This question is not entirely about CSS, about SharePoint.
sharepoint web-parts
Randolpho
source share