Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have added code snippet to my team site containing the following code:-

<div class="ms-comm-adminLinks ms-core-defaultFont ms-noList" unselectable="on"> 
  <div class="ms-webpart-titleText" unselectable="on"> Useful Links </div> 
<ul class="ms-comm-adminLinksList" unselectable="on"> 

<ul unselectable="on">

 <li class="ms-comm-adminLinksListItem" unselectable="on"><a href="https://login.salesforce.com/" target="_blank" unselectable="on"> Salesforce </a></li>
//code goes here
  </ul>
</ul></div>

but this will have the defualt light-grey back ground color as shown below. so is there a way to modify this background color without affecting the ms-comm-adminLinks ms-core-defaultFont ms-noList format ?

enter image description here

EDIT

I have added the following to my custom CSS file:-

.ms-comm-adminLinks {
    background-color:#008CD2 !important;
    }
    .ms-comm-adminLinksListItem a{
    color:white;
    }
    .ms-webpart-titleText{
    color:white !important;
    }

And it chnage the format as needed, so is this approach wrong or considered risky, and the result is now as follow:- enter image description here

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Why not just wrap it in an element with a specific CSS class?

<ul>
  <!-- snipped -->
  <li class="ms-comm-adminLinksListItem" unselectable="on"><a href="https://login.salesforce.com/" target="_blank" unselectable="on"> Salesforce </a></li>
  <div class="codeSnippet">
     //code goes here
  </div>
</ul>

You could then style the codeSnippet class any way you liked.

share|improve this answer
    
can you check my Edit please ? –  john G Sep 25 '13 at 23:17
    
It is generally a bad idea to override styles from Microsoft though there are times when it is necessary. Since you are just changing the color, this should be acceptable though I would have tried to find a more specific selector first, something like .MyLeftCol .ms-comm-adminlinks { /* style stuff */ } –  Dave Wise Sep 26 '13 at 13:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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