0

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

1 Answer 1

2

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.

2
  • can you check my Edit please ?
    – John John
    Commented Sep 25, 2013 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
    Commented Sep 26, 2013 at 13:44

Your Answer

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

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