Changing appearance of web parts in SharePoint 2013 using CSS
up vote
1
down vote
favorite
I have built a site in SharePoint and would now like to change the appearance of web parts (document libraries) using CSS.
Whenever I add the following CSS code:
<style type="text/css">
.ms-webpart-titleText.ms-webpart-titleText, .ms-webpart-titleText > a {
background-color: darkblue;
font-size: 18px;
font-weight: bold;
color: white;
padding: 5px 5px;}
</style>
...I find that the preview window in my web browser shows a change has taken place.
Unfortunately, when I apply the changes and view the page again, the web part has reverted to the default appearance.
Does anyone have any ideas what could be causing this to happen?
css sharepoint-2013
add a comment |
up vote
1
down vote
favorite
I have built a site in SharePoint and would now like to change the appearance of web parts (document libraries) using CSS.
Whenever I add the following CSS code:
<style type="text/css">
.ms-webpart-titleText.ms-webpart-titleText, .ms-webpart-titleText > a {
background-color: darkblue;
font-size: 18px;
font-weight: bold;
color: white;
padding: 5px 5px;}
</style>
...I find that the preview window in my web browser shows a change has taken place.
Unfortunately, when I apply the changes and view the page again, the web part has reverted to the default appearance.
Does anyone have any ideas what could be causing this to happen?
css sharepoint-2013
1
Try using SharePoint designer :)
– Samuel Nicholson
Jul 14 '14 at 14:34
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have built a site in SharePoint and would now like to change the appearance of web parts (document libraries) using CSS.
Whenever I add the following CSS code:
<style type="text/css">
.ms-webpart-titleText.ms-webpart-titleText, .ms-webpart-titleText > a {
background-color: darkblue;
font-size: 18px;
font-weight: bold;
color: white;
padding: 5px 5px;}
</style>
...I find that the preview window in my web browser shows a change has taken place.
Unfortunately, when I apply the changes and view the page again, the web part has reverted to the default appearance.
Does anyone have any ideas what could be causing this to happen?
css sharepoint-2013
I have built a site in SharePoint and would now like to change the appearance of web parts (document libraries) using CSS.
Whenever I add the following CSS code:
<style type="text/css">
.ms-webpart-titleText.ms-webpart-titleText, .ms-webpart-titleText > a {
background-color: darkblue;
font-size: 18px;
font-weight: bold;
color: white;
padding: 5px 5px;}
</style>
...I find that the preview window in my web browser shows a change has taken place.
Unfortunately, when I apply the changes and view the page again, the web part has reverted to the default appearance.
Does anyone have any ideas what could be causing this to happen?
css sharepoint-2013
css sharepoint-2013
asked Jun 7 '14 at 11:51
Austin ''Danger'' Powers
4,979113558
4,979113558
1
Try using SharePoint designer :)
– Samuel Nicholson
Jul 14 '14 at 14:34
add a comment |
1
Try using SharePoint designer :)
– Samuel Nicholson
Jul 14 '14 at 14:34
1
1
Try using SharePoint designer :)
– Samuel Nicholson
Jul 14 '14 at 14:34
Try using SharePoint designer :)
– Samuel Nicholson
Jul 14 '14 at 14:34
add a comment |
4 Answers
4
active
oldest
votes
up vote
0
down vote
What is likely to be happening is that wherever you are loading that CSS, it is being overridden by the standard CSS.
You can try adding the !important
tag to the end of the entry. You should check out the code using web developer tools in the browser to make sure that the CSS is actually being loaded and not dropped by SharePoint and find out what might be taking preference to your code. Using Firefox with the Firebug addin should assist greatly.
Let us know:
- Exactly what webpart you are trying to change
- How & where you are inserting the CSS
- What page layout and master page you are using
add a comment |
up vote
0
down vote
Your Web Part Chrome Type might be the problem. You will be able to see changes on edit mode, but if your Chrome Type is set to Default, None, or Border Only, you will not see the title on the actual page.
On your Title on the edit mode page, go to the far right, and click on the drop down menu. Click on Edit Web Part, and go to Appearance. There you should find the Chrome Type settings. This can also be done in SharePoint Designer.
add a comment |
up vote
0
down vote
I would create ".txt" file store in site assets library, and just call out this text file in content editor.
1
Why would you use this approach? What benefit does it have over other methods? Currently this answer is more suited to be a comment.
– Burgi
May 13 '16 at 19:48
add a comment |
up vote
0
down vote
It's probably because you are trying to EMBED style code, which gets deleted when you save the page. Instead, use a CEWP with an external .txt file, or you can use the Script Editor Web Part with style code.
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
What is likely to be happening is that wherever you are loading that CSS, it is being overridden by the standard CSS.
You can try adding the !important
tag to the end of the entry. You should check out the code using web developer tools in the browser to make sure that the CSS is actually being loaded and not dropped by SharePoint and find out what might be taking preference to your code. Using Firefox with the Firebug addin should assist greatly.
Let us know:
- Exactly what webpart you are trying to change
- How & where you are inserting the CSS
- What page layout and master page you are using
add a comment |
up vote
0
down vote
What is likely to be happening is that wherever you are loading that CSS, it is being overridden by the standard CSS.
You can try adding the !important
tag to the end of the entry. You should check out the code using web developer tools in the browser to make sure that the CSS is actually being loaded and not dropped by SharePoint and find out what might be taking preference to your code. Using Firefox with the Firebug addin should assist greatly.
Let us know:
- Exactly what webpart you are trying to change
- How & where you are inserting the CSS
- What page layout and master page you are using
add a comment |
up vote
0
down vote
up vote
0
down vote
What is likely to be happening is that wherever you are loading that CSS, it is being overridden by the standard CSS.
You can try adding the !important
tag to the end of the entry. You should check out the code using web developer tools in the browser to make sure that the CSS is actually being loaded and not dropped by SharePoint and find out what might be taking preference to your code. Using Firefox with the Firebug addin should assist greatly.
Let us know:
- Exactly what webpart you are trying to change
- How & where you are inserting the CSS
- What page layout and master page you are using
What is likely to be happening is that wherever you are loading that CSS, it is being overridden by the standard CSS.
You can try adding the !important
tag to the end of the entry. You should check out the code using web developer tools in the browser to make sure that the CSS is actually being loaded and not dropped by SharePoint and find out what might be taking preference to your code. Using Firefox with the Firebug addin should assist greatly.
Let us know:
- Exactly what webpart you are trying to change
- How & where you are inserting the CSS
- What page layout and master page you are using
answered Jun 7 '14 at 16:43
Julian Knight
12.9k11535
12.9k11535
add a comment |
add a comment |
up vote
0
down vote
Your Web Part Chrome Type might be the problem. You will be able to see changes on edit mode, but if your Chrome Type is set to Default, None, or Border Only, you will not see the title on the actual page.
On your Title on the edit mode page, go to the far right, and click on the drop down menu. Click on Edit Web Part, and go to Appearance. There you should find the Chrome Type settings. This can also be done in SharePoint Designer.
add a comment |
up vote
0
down vote
Your Web Part Chrome Type might be the problem. You will be able to see changes on edit mode, but if your Chrome Type is set to Default, None, or Border Only, you will not see the title on the actual page.
On your Title on the edit mode page, go to the far right, and click on the drop down menu. Click on Edit Web Part, and go to Appearance. There you should find the Chrome Type settings. This can also be done in SharePoint Designer.
add a comment |
up vote
0
down vote
up vote
0
down vote
Your Web Part Chrome Type might be the problem. You will be able to see changes on edit mode, but if your Chrome Type is set to Default, None, or Border Only, you will not see the title on the actual page.
On your Title on the edit mode page, go to the far right, and click on the drop down menu. Click on Edit Web Part, and go to Appearance. There you should find the Chrome Type settings. This can also be done in SharePoint Designer.
Your Web Part Chrome Type might be the problem. You will be able to see changes on edit mode, but if your Chrome Type is set to Default, None, or Border Only, you will not see the title on the actual page.
On your Title on the edit mode page, go to the far right, and click on the drop down menu. Click on Edit Web Part, and go to Appearance. There you should find the Chrome Type settings. This can also be done in SharePoint Designer.
edited Apr 30 '15 at 4:08
RockPaperLizard
3,054133568
3,054133568
answered Apr 29 '15 at 16:34
Adrian Garcia
1
1
add a comment |
add a comment |
up vote
0
down vote
I would create ".txt" file store in site assets library, and just call out this text file in content editor.
1
Why would you use this approach? What benefit does it have over other methods? Currently this answer is more suited to be a comment.
– Burgi
May 13 '16 at 19:48
add a comment |
up vote
0
down vote
I would create ".txt" file store in site assets library, and just call out this text file in content editor.
1
Why would you use this approach? What benefit does it have over other methods? Currently this answer is more suited to be a comment.
– Burgi
May 13 '16 at 19:48
add a comment |
up vote
0
down vote
up vote
0
down vote
I would create ".txt" file store in site assets library, and just call out this text file in content editor.
I would create ".txt" file store in site assets library, and just call out this text file in content editor.
answered May 13 '16 at 16:45
user593713
1
1
1
Why would you use this approach? What benefit does it have over other methods? Currently this answer is more suited to be a comment.
– Burgi
May 13 '16 at 19:48
add a comment |
1
Why would you use this approach? What benefit does it have over other methods? Currently this answer is more suited to be a comment.
– Burgi
May 13 '16 at 19:48
1
1
Why would you use this approach? What benefit does it have over other methods? Currently this answer is more suited to be a comment.
– Burgi
May 13 '16 at 19:48
Why would you use this approach? What benefit does it have over other methods? Currently this answer is more suited to be a comment.
– Burgi
May 13 '16 at 19:48
add a comment |
up vote
0
down vote
It's probably because you are trying to EMBED style code, which gets deleted when you save the page. Instead, use a CEWP with an external .txt file, or you can use the Script Editor Web Part with style code.
add a comment |
up vote
0
down vote
It's probably because you are trying to EMBED style code, which gets deleted when you save the page. Instead, use a CEWP with an external .txt file, or you can use the Script Editor Web Part with style code.
add a comment |
up vote
0
down vote
up vote
0
down vote
It's probably because you are trying to EMBED style code, which gets deleted when you save the page. Instead, use a CEWP with an external .txt file, or you can use the Script Editor Web Part with style code.
It's probably because you are trying to EMBED style code, which gets deleted when you save the page. Instead, use a CEWP with an external .txt file, or you can use the Script Editor Web Part with style code.
answered Jul 11 '16 at 12:49
Jill
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f764842%2fchanging-appearance-of-web-parts-in-sharepoint-2013-using-css%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Try using SharePoint designer :)
– Samuel Nicholson
Jul 14 '14 at 14:34