I have a library where we have items. My aim is to make these items as a scrolling text in the home page.

I used Content Query webpart to get this items to the home page and I added marquee tag to this, but the items in the web part font color is blue.

Can anyone help how to change this blue to red?

Here is the code of web part

<marquee scrolldelay="30" direction="left" scrollamount="8" style="width: 1350px; height: 396px;"><span class="ms-rteThemeForeColor-9-5"></span><span class="ms-rteThemeForeColor-9-5"></span><span class="ms-rteThemeForeColor-9-5"></span><span class="ms-rteThemeForeColor-9-5"></span><span class="ms-rteThemeForeColor-9-5"></span>
       <span class="ms-rteBackColor-2 ms-rteFontSize-6 ms-rteForeColor-1"> </span><span class="ms-rteForeColor-1"></span><span class="ms-rteForeColor-1"></span>
          <div class="ms-rtestate-read ms-rte-wpbox" contenteditable="false">
    <div class="ms-rtestate-notify  ms-rtestate-read 2c2e53d8-9808-4d04-af98-c2b2e5b4d7ce" id="div_2c2e53d8-9808-4d04-af98-c2b2e5b4d7ce" unselectable="on">
  <div id="vid_2c2e53d8-9808-4d04-af98-c2b2e5b4d7ce" unselectable="on" style="display: none;">
  • Can you please provide the container having morquee tag? You might need that and depends on that you can set colour with the help of CSS class. – Ram Jan 24 '17 at 7:24
  • 2
    Try removing this css class ms-rteForeColor-1 and ms-rteThemeForeColor-9-5 from all places where it is used, to not get colors from SharePoint theme branding – Robert Lindgren Jan 24 '17 at 7:29
  • 3
    Remember, marquee is a deprecated tag, once introduced in IE, never became a standard. So your mileage may vary on other browers. – Danny '365CSI' Engelman Jan 24 '17 at 9:58
  • Have you thought about using something more modern? Something like pulling in your items via the REST API and adding css animation to them? – psdpainter Aug 14 '18 at 17:17

Try passing color tag in marquee with !importance to override color in items.

<marquee scrolldelay="30" direction="left" scrollamount="8" style="width: 1350px; height: 396px;color:red !important">
| improve this answer | |
  • i tried this already but dint work. is there any way to change the font color for this particular web part – sai Jan 24 '17 at 7:23
  • can you share the html rendered after displaying webpart – Dhruv Jain Jan 24 '17 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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