Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sharepoint 2010 Calander webpart Css issue

Posted on 2014-02-24
1
Medium Priority
?
530 Views
Last Modified: 2014-03-23
I alreday created using Calander List for "Upcoming Events Company",
After goto Edit ->  Edit HTML Source  insert Following CSS ,
<code>
/* All TDs in the table row */
.ms-WPHeader TD{
background-color: #f7f7f7;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ebebeb', endColorstr='#e2e2e2');
background: -webkit-gradient(linear, left top, left bottom, from(#e2e2e2), to(#ebebeb));
background: -moz-linear-gradient(top, #e2e2e2, #ebebeb);
border-top:1px #cfcfcf solid; border-bottom:1px #e2e2e2 solid!important;
padding:3px;
}
/* for css / jquery drop shadow */
.WebPartBorder{
border:1px #777 solid!important;
-moz-box-shadow: 5px 5px 5px #ccc;
-webkit-box-shadow: 5px 5px 5px #ccc;
box-shadow: 5px 5px 5px #ccc;/* CSS3 */
background-color:#fff;
filter: progid:DXImageTransform.Microsoft.DropShadow(OffX=5, OffY=5, Color=#e9e9e9);    
}
.WebPartBorder > tbody {
background-color:#f7f7f7!important
}
/* Border to the sides */
.ms-WPHeader td:first-child {
border-left:1px #e2e2e2 solid;
border-right:0px;
}
.ms-wpTdSpace {
border-right:1px #e2e2e2 solid;
}
/* Web part title */
.ms-WPTitle {
color: #333;
font-weight:bold;
}
/* linked title and visited */
.ms-WPTitle a, .ms-WPTitle a:visited {
color: #333!important;
text-decoration:none!important;
}
/* hover title */
.ms-WPTitle a:hover {
color:#0072bc!important;
}
/* hover web part menu */
.ms-WPHeaderTdMenu:hover{
 background-image:none;
border-top:1px solid #ccc;
border-right:1px solid transparent;
border-left:1px solid transparent;
background-color:#f7f7f7;
}
/* for the jQuery */
.LinkTextColor {
color:red;
}

</code>


but it will show when after insert but after Save and Close it will vanished,and no out put for CSS

<code>
.ExternalClass9FF3A5730B2547EDA3542CA31F50A9A2 .ms-WPHeader TD {
      BORDER-TOP: #cfcfcf 1px solid; BORDER-BOTTOM: #e2e2e2 1px solid; PADDING-BOTTOM: 3px; PADDING-TOP: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; BACKGROUND-COLOR: #fe0449;COLOR:#fff}
.ExternalClass9FF3A5730B2547EDA3542CA31F50A9A2 .WebPartBorder {
      BORDER-TOP: #777 1px solid; BORDER-RIGHT: #777 1px solid; BORDER-BOTTOM: #777 1px solid; BORDER-LEFT: #777 1px solid; BACKGROUND-COLOR: #fff; box-shadow: 5px 5px 5px #fff
}
.ExternalClass9FF3A5730B2547EDA3542CA31F50A9A2 .ms-wpTdSpace {
      BORDER-RIGHT: #e2e2e2 1px solid
}
.ExternalClass9FF3A5730B2547EDA3542CA31F50A9A2 .ms-WPTitle {
      FONT-WEIGHT: bold; COLOR: #fff}
.ExternalClass9FF3A5730B2547EDA3542CA31F50A9A2 .ms-WPTitle A {
      TEXT-DECORATION: none !important; COLOR: #fff !important
}
.ExternalClass9FF3A5730B2547EDA3542CA31F50A9A2 .ms-WPTitle A:visited {
      TEXT-DECORATION: none !important; COLOR: #fff !important
}
.ExternalClass9FF3A5730B2547EDA3542CA31F50A9A2 .ms-WPTitle A:hover {
      COLOR: #fff !important
}
.ExternalClass9FF3A5730B2547EDA3542CA31F50A9A2 .ms-WPHeaderTdMenu:hover {
      BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: transparent 1px solid; BACKGROUND-IMAGE: none; BORDER-LEFT: transparent 1px solid; BACKGROUND-COLOR: #f7f7f7
}
.ExternalClass9FF3A5730B2547EDA3542CA31F50A9A2 .LinkTextColor {
      COLOR: red
}</
</code>
, then after go to HTML Editor following CSS will show.



Could you please someone show me how to put proper way to CSS file in to the Calander List.
0
Comment
Question by:ukerandi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
Robin Hall earned 2000 total points
ID: 39930188
ukerandi,

From my personal experience, if I'm trying to add in a little CSS or Javascript to the page I don't put it directly in the HTML.

If you add a Form Web Part to the page and put your CSS into the web part via "Source Editor", that will prevent SharePoint from altering your CSS.  Just make sure you set the Chrome to "None" in order for it not to be visible once you get out of edit mode.

Also make sure that you wrap it in

<style type="text/css">
</style> 

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question