1

enter image description here

This is an html form that I have uploaded in document library and then added the link to content editor webpart. The CSS Like the colors and all that I have provided in the actual form is not working but the spacing and all is working fine on the SharePoint Webpage. The below is the image of actual html.

enter image description here

Can anyone help me with this problem?

Thank You in advance

1
  • 1
    You need to override some of the CSS with yours by applying !important. That's how it works in SharePoint.
    – Pradip R.
    Sep 1, 2017 at 5:15

1 Answer 1

1

SharePoint applies most of the styles as regular css styles (only some of them are applied directly to the element as a style attribute). In order to override them you have to provide more accurate selectors then default SharePoint selectors. It may be difficult to achieve in some situation, so you can use !important to override them.

3
  • What selectors shall I use here? Sep 1, 2017 at 6:18
  • If you have applied your custom css and controls do not look like you wanted to, you can run developer tools in chrome and check each element. Styles panel will show you which styles are applied and what selectors are related with them. Based on that you can create more specific selectors
    – rafter13
    Sep 1, 2017 at 6:27
  • see/learn: smashingmagazine.com/2007/07/… Dec 1, 2017 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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