- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2015 09:19 AM
I'm currently studying from a CMS training book from my work and I'm currently not able to have something clarified.
The instructions stated to create a new dynamic block to use as a header dashboard. I went to Content Management > Block > Dynamic and coded in the javascript and xml and applied the block to a test page. Then the book states I should "Add styles". However, I'm not sure how a CSS sheet would be linked and applied to the dynamic content block that I created for pages in my CMS site. Any tips on where I would enter the required CSS so that it is applied to the dynamic content block I made?
Thanks,
Rob
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2015 09:26 AM
Style sheets are not directly associated with content blocks typically. The style sheets should be associated with a theme, and a theme can be associated with a site or a page. Content blocks are then added to a page, so the styles will be applied to anything within a page or site.
Does that help?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2015 09:26 AM
Style sheets are not directly associated with content blocks typically. The style sheets should be associated with a theme, and a theme can be associated with a site or a page. Content blocks are then added to a page, so the styles will be applied to anything within a page or site.
Does that help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2015 11:27 AM
That cleared things up for me for sure. The structure and navigation of applying content to my site is still a little blurry, so I greatly appreciate the clarification. Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2015 10:02 AM
Building upon Brad's response.
For styling in a dynamic block. Your block should contain HTML tags such as DIV, STYLE, P, etc.. Each of these tags can be styled with CSS using ID's or Classes. For instance:
<div id="list1" class="list>
<div id="row1" class="listContent">
.... row content
</div>
</div>
With this information in a dynamic block, you can style it with css in a CMS Stylesheet. Stylesheets are related to a Theme. Here is a screenshot of a stylesheet for one of my sites.
I put all my CSS for my site in the Site Overrides Stylesheet. Notice that it's order is 9999. This will come last in all the Stylesheets.
You can then add the appropriate CSS. Remember the more specific you are in the CSS selector the higher the precedence.
div.list {
}
div .listContent {
}
These selectors would apply the CSS styles to the list and listContent classes in your block.
For this CSS to be on the page, then the page must be using the StyleSheet's theme. In this case it's Bootstrap. The page could specify the theme or the site could have the theme as it's default. The latter is most often the case and easiest to support.
It is possible to put the CSS styles directly into the dynamic block. I do not recommend doing this as it's difficult for reuse and supportablity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2015 11:30 AM
Wow, thank you for such an in depth response. I've had experience with HTML and CSS prior to using it for Service Now CMS, however I greatly appreciate the detailed examples and screen shot to show how things work in Service Now. Thanks again Reed.