locked
CSS not compatible RRS feed

  • Question

  • Hi,

    I have a developed a custom web part for sharepoint 2007, with a button control.

    I have a CSS code for the button control, however when I deploy the web part on site, it doesn't show the CSS formatting.

    Please help me on this.

    Monday, June 29, 2015 6:25 AM

Answers

  • Have you checked what styles the button is taking? Seems that there are other styles overwriting yours, have you checked the button styles in the developer tools?

    Mohamed Derhalli

    SharePoint Consultant

    Blog: SharePoint Thoughts    Twitter:    LinkedIn:   

    Tuesday, June 30, 2015 2:43 PM

All replies

  • Hi,

    According to your description, my understanding is that when you deploy a web part, the button control CSS style not applied.

    For a better troubleshooting, I suggest you can use Internet Explorer Developer Tool to check if the CSS style is loaded in the web part page. Also you can use some simple CSS code to test if the CSS is valid.

    Here is a detailed article for your reference:

    Using F12 Developer Tools to Debug HTML and CSS

    Thanks

    Best Regards


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Tuesday, June 30, 2015 1:40 AM
  • How did you add the CSS for the button? Is in inline? If it's in an external file, did you make sure that the .css file is loaded to the page? Check the source for the page and see if the CSS file is loaded, if not you should troubleshoot the reference for the file.

    Mohamed Derhalli

    SharePoint Consultant

    Blog: SharePoint Thoughts    Twitter:    LinkedIn:   

    Tuesday, June 30, 2015 2:20 AM
  • Hi,

    Its external CSS file, I have loaded the css file on the page.

    Refer the below code.

    but still I am not able to get the CSS styling for the button after the deployment.

    Tuesday, June 30, 2015 2:40 PM
  • Have you checked what styles the button is taking? Seems that there are other styles overwriting yours, have you checked the button styles in the developer tools?

    Mohamed Derhalli

    SharePoint Consultant

    Blog: SharePoint Thoughts    Twitter:    LinkedIn:   

    Tuesday, June 30, 2015 2:43 PM