You use the CSS widget to refer Cascading Style Sheets (CSS) resources in your pages. The widget provides capabilities for referring both inline styles and references to CSS files into the page <head> tag.
<head>
After you place the CSS widget on your page you configure which CSS files to include. To do this, click Edit button in the upper-right corner of the widget. The following sections describe the properties and settings you need to define.
You can either wrte a new CSS file from scratch or link to an existing CSS file. Choose one of the options:
body { background: #fff; font-size: 12px; }
NOTE: You do not need to add a <style> tag, since it is automatically added.
<style>
Under Media, select the media type that refers the CSS file:
NOTE: For details on types, see Media types.
Expand More options section to optionally add a description for the referenced CSS file. This description is displayed only when pages are in edit mode, so that you easily distinguish CSS files.
Model settings display all properties directly bound to the CSS widget model. Access these properties by clicking the Model button in Advanced settings.
Description Gets and sets the description of the CSS that is referenced. This field is for your convenience only.
InlineStyles Gets and sets inline styles that are displayed in the code area when the widget is in Write CSS mode. The content of this field is rendered inside <style> tag, in the <head> section of your HTML file.
head>
MediaType Gets and sets the media types to which the CSS is applied.
Mode Defines the supported ways to refer CSS through the widget. Choose one of the options:
ResourceUrl Gets and sets resource URL which is referenced in the page <head> tag. This ResourceUrl is used only when the CSS widget is in Reference mode.
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.
This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.
The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important