{"id":2232,"date":"2019-08-28T19:24:16","date_gmt":"2019-08-28T19:24:16","guid":{"rendered":"http:\/\/sites.la.utexas.edu\/kb\/?p=2232"},"modified":"2020-06-18T16:45:54","modified_gmt":"2020-06-18T16:45:54","slug":"making-clio-site-aesthetic-handy-coding-snippets","status":"publish","type":"post","link":"http:\/\/sites.la.utexas.edu\/kb\/2019\/08\/28\/making-clio-site-aesthetic-handy-coding-snippets\/","title":{"rendered":"Styling CLIO to Visually Enhance Learning &#8211; Coding Snippets"},"content":{"rendered":"<h2><a href=\"http:\/\/sites.la.utexas.edu\/kb\/2019\/08\/28\/making-clio-site-aesthetic-handy-coding-snippets\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3519\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2020\/06\/html-V2.png\" alt=\"\" width=\"91\" height=\"25\" \/><\/a><\/h2>\n<h2>Introduction<\/h2>\n<p>This tutorial will cover how we can use CSS in order to style a CLIO page and improve students&#8217; learning experience.<\/p>\n<p>While styling CLIO, make sure that your visuals complement the overall material that&#8217;s trying to be taught. For example, if the page teaches about the precipitation cycle, the visuals can support it with the use of brighter colors to complement any diagrams and text. On the other hand, if your CLIO page is teaching a dense topic like war crimes, the visuals might support that through darker and modest styling.<\/p>\n<p>For the sake of this tutorial, my course page will be teaching students about splash pads, so we&#8217;ll try to support the content with splashy visuals!<\/p>\n<h2>What is a Card?<\/h2>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-30-at-3.37.42-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2366\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-30-at-3.37.42-PM.png\" alt=\"\" width=\"1672\" height=\"759\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-30-at-3.37.42-PM.png 1672w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-30-at-3.37.42-PM-300x136.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-30-at-3.37.42-PM-768x349.png 768w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-30-at-3.37.42-PM-1024x465.png 1024w\" sizes=\"auto, (max-width: 1672px) 100vw, 1672px\" \/><\/a><\/p>\n<p>A\u00a0<span style=\"text-decoration: underline\"><strong>card<\/strong><\/span> is a container you, the instructor or web editor, can put content (text, hyperlinks, videos, mp3s, images) into and have represented as a physical card when a student uses your module. With a bit of fiddling, you can give each card a styled banner that helps give definition to the structure of your content.<\/p>\n<h2>What We&#8217;re Making<\/h2>\n<p>Here&#8217;s what we start with &#8211; a plain card without a visually-supported banner:<\/p>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-30-at-3.46.59-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2367\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-30-at-3.46.59-PM.png\" alt=\"\" width=\"1005\" height=\"525\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-30-at-3.46.59-PM.png 1005w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-30-at-3.46.59-PM-300x157.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-30-at-3.46.59-PM-768x401.png 768w\" sizes=\"auto, (max-width: 1005px) 100vw, 1005px\" \/><\/a><\/p>\n<p>Here&#8217;s what we&#8217;ll end up with at the end of this tutorial:<\/p>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.10.11-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2379\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.10.11-AM.png\" alt=\"\" width=\"893\" height=\"437\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.10.11-AM.png 893w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.10.11-AM-300x147.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.10.11-AM-768x376.png 768w\" sizes=\"auto, (max-width: 893px) 100vw, 893px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>What kind of styling is involved here? Let&#8217;s break it down.<\/p>\n<h2>Observing the Styling<\/h2>\n<p>First off, we&#8217;re using a <strong>background image<\/strong> for the banner, namely this one:<\/p>\n<div id=\"attachment_2344\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/minimal_landscape-wallpaper-2560x1440.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2344\" class=\"wp-image-2344 size-medium\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/minimal_landscape-wallpaper-2560x1440-300x169.jpg\" alt=\"\" width=\"300\" height=\"169\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/minimal_landscape-wallpaper-2560x1440-300x169.jpg 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/minimal_landscape-wallpaper-2560x1440-768x432.jpg 768w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/minimal_landscape-wallpaper-2560x1440-1024x576.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-2344\" class=\"wp-caption-text\">You can download it here: http:\/\/wallpaperswide.com\/download\/minimal_landscape-wallpaper-2560&#215;1440.jpg<\/p><\/div>\n<p>Feel free to use your own background image and be creative with your visuals! For our case, this image obviously won&#8217;t fit into the vertically-thin card banner on CLIO, so we&#8217;ll only be using a snippet of it.<\/p>\n<p>We also see that the text has a <strong>larger\u00a0size<\/strong>, it&#8217;s\u00a0<strong>italicized<\/strong>, and <strong>maroon<\/strong>.<\/p>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.32.37-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2380\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.32.37-AM.png\" alt=\"\" width=\"1255\" height=\"348\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.32.37-AM.png 1255w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.32.37-AM-300x83.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.32.37-AM-768x213.png 768w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.32.37-AM-1024x284.png 1024w\" sizes=\"auto, (max-width: 1255px) 100vw, 1255px\" \/><\/a><\/p>\n<p>Let&#8217;s dive into the CSS!<\/p>\n<h2>Show me the CSS Code!<\/h2>\n<p>Every time you create a new card on an activity, it contains a header div called\u00a0<strong>card-header<\/strong>.<\/p>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.46.57-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2383\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.46.57-AM.png\" alt=\"\" width=\"1024\" height=\"589\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.46.57-AM.png 1024w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.46.57-AM-300x173.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-11.46.57-AM-768x442.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>As you can see, if you don&#8217;t specify what content goes\u00a0<strong>into<\/strong> the card header (<em>as demonstrated in the second card<\/em>), the card header will just hide itself until it has something to show.<\/p>\n<p>First off, let&#8217;s specify how we want card headers to be styled.<\/p>\n<div>\n<pre>.card-header\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0background-position:\u00a0left;\r\n\u00a0\u00a0\u00a0\u00a0background-repeat:\u00a0no-repeat;\r\n\u00a0\u00a0\u00a0\u00a0text-align:\u00a0center;\r\n\u00a0\u00a0\u00a0\u00a0line-height:\u00a03;\r\n\u00a0\u00a0\u00a0\u00a0background-image:\u00a0url(http:\/\/wallpaperswide.com\/download\/minimal_landscape-wallpaper-2560x1440.jpg);\r\n}<\/pre>\n<p>What does this all mean?<\/p>\n<ul>\n<li><span style=\"text-decoration: underline\"><strong>.card-header { &#8230; }:<\/strong><\/span> since each card always has a div called\u00a0<strong>card-header<\/strong>, we&#8217;re telling the browser &#8220;hey, for every div that&#8217;s called <em>card-header<\/em>, give it the following attributes!&#8221;<\/li>\n<li><span style=\"text-decoration: underline\"><strong>background-position:<\/strong><\/span>\u00a0specifies where the background image will start. For our case, we put\u00a0<strong>left<\/strong>, which means that it will start on the left and vertical center of the image. So, this area:<\/li>\n<\/ul>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-3.01.23-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2349\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-3.01.23-PM.png\" alt=\"\" width=\"921\" height=\"524\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-3.01.23-PM.png 921w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-3.01.23-PM-300x171.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-3.01.23-PM-768x437.png 768w\" sizes=\"auto, (max-width: 921px) 100vw, 921px\" \/><\/a><\/p>\n<ul>\n<li><span style=\"text-decoration: underline\"><strong>background-repeat<\/strong><\/span><span style=\"text-decoration: underline\">:<\/span> this one&#8217;s self-explanatory, repeat the image if it&#8217;s smaller than the canvas its fitting into. In our case, we don&#8217;t want it to repeat.<\/li>\n<li><span style=\"text-decoration: underline\"><strong>text-align<\/strong><\/span><span style=\"text-decoration: underline\">:<\/span>\u00a0align our text whenever we add it to the header. We&#8217;ll want it to be\u00a0<strong>center<\/strong>.<\/li>\n<li><span style=\"color: #000000\"><strong><span style=\"text-decoration: underline\">line-height:<\/span>\u00a0<\/strong>specifies the minimum height of our card-header div.<\/span><\/li>\n<li><span style=\"text-decoration: underline\"><strong>background-image:<\/strong><\/span><strong>\u00a0<\/strong>here you can specify a URL of an image or a locally stored one. The entire background of our card-header div will be this image.<\/li>\n<\/ul>\n<p>Let&#8217;s go ahead and paste our code snippet into the CLIO module editor and see what happens. We should be able to see the background image in the card header now, right?<\/p>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-3.10.57-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2350\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-3.10.57-PM.png\" alt=\"\" width=\"856\" height=\"426\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-3.10.57-PM.png 856w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-3.10.57-PM-300x149.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-3.10.57-PM-768x382.png 768w\" sizes=\"auto, (max-width: 856px) 100vw, 856px\" \/><\/a><\/p>\n<p>Let&#8217;s look at our card&#8230;<\/p>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/card-no-header.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2346\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/card-no-header.png\" alt=\"\" width=\"805\" height=\"125\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/card-no-header.png 805w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/card-no-header-300x47.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/card-no-header-768x119.png 768w\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" \/><\/a><\/p>\n<p>It&#8217;s still not there! How could this be?!<\/p>\n<\/div>\n<p>Remember, as mentioned before,\u00a0<strong>you need to add content into your card header before it will show up<\/strong>.<\/p>\n<p>Let&#8217;s do that now. We&#8217;ll need two more CSS snippets here, one that will style the banner text, and one that actually contains the text.<\/p>\n<div>\n<pre>.card-header:after\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0color:\u00a0maroon;\r\n\u00a0\u00a0\u00a0\u00a0font-style:\u00a0italic;\r\n\u00a0\u00a0\u00a0\u00a0font-weight:\u00a0bold;\r\n\u00a0\u00a0\u00a0\u00a0font-size:\u00a01.9em;\r\n}<\/pre>\n<ul>\n<li><span style=\"text-decoration: underline\"><strong>.card-header:after:<\/strong><\/span>\u00a0tells the browser &#8220;after you&#8217;ve finished rendering the card-header with the background image, positioning, and everything else, style everything afterwards with this CSS&#8221;<\/li>\n<li><span style=\"text-decoration: underline\"><strong>color:<\/strong><\/span> the color we want the text to be<\/li>\n<li><span style=\"text-decoration: underline\"><strong>font-style:<\/strong><\/span> styling the font (to <em>italicized<\/em> in our case)<\/li>\n<li><span style=\"text-decoration: underline\"><strong>font-weight:<\/strong><\/span> density of each character (bold, normal thickness, etc.)<\/li>\n<li><span style=\"text-decoration: underline\"><strong>font-size:<\/strong><\/span> the size of the font.\u00a0<em>em<\/em> is a\u00a0<span style=\"text-decoration: underline\">relative unit<\/span> that applies to the font-size, so if you say 2em, the result will be 2 * the normal font-size of the element.<\/li>\n<\/ul>\n<p>Now, all we need to do is specify the content we want in the header!<\/p>\n<div>\n<pre><strong><span style=\"color: #ff6600\">.default-card<\/span><\/strong>\u00a0.card-header:after\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0content:\u00a0\"A\u00a0Splash\u00a0of\u00a0History\";\r\n}<\/pre>\n<ul>\n<li><strong><span style=\"text-decoration: underline;color: #ff6600\">.default-card:<\/span><\/strong><span style=\"color: #ff6600\"><span style=\"color: #000000\"> this is the &#8220;type&#8221; we&#8217;re giving to our card. It&#8217;s what makes it unique from other cards who have a different types. So, every card that has this type will have &#8220;<em>A Splash of History<\/em>&#8221; as its content.<\/span><\/span><\/li>\n<li><span style=\"text-decoration: underline\"><strong>content:<\/strong><\/span>\u00a0the banner text for this card type.<\/li>\n<\/ul>\n<p>Let&#8217;s paste these snippets into the same location we did before, and check the result.<\/p>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/card-no-header.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2346\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/card-no-header.png\" alt=\"\" width=\"805\" height=\"125\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/card-no-header.png 805w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/card-no-header-300x47.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/card-no-header-768x119.png 768w\" sizes=\"auto, (max-width: 805px) 100vw, 805px\" \/><\/a>Darn! We&#8217;re forgetting one more step&#8230;<\/p>\n<p>Whenever we created the card in CLIO, there was a field named\u00a0<strong>Custom Classes<\/strong>, which basically lets you specify the type of each card. In our case, we called our type\u00a0<strong>default-card<\/strong>, so let&#8217;s go ahead and put that in. Note, whenever you enter the type here,\u00a0<strong>you do NOT add <code>.<\/code>\u00a0in front of the card type. <code>.<\/code>\u00a0is used in CSS to identify that something is a class, but in this input field, we only need to pass in the name of the class.<\/strong><\/p>\n<\/div>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-26-at-11.50.47-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2358\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-26-at-11.50.47-AM.png\" alt=\"\" width=\"956\" height=\"431\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-26-at-11.50.47-AM.png 956w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-26-at-11.50.47-AM-300x135.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-26-at-11.50.47-AM-768x346.png 768w\" sizes=\"auto, (max-width: 956px) 100vw, 956px\" \/><\/a><\/p>\n<div>\n<p>And&#8230;<\/p>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-12.16.10-PM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2385\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-12.16.10-PM.png\" alt=\"\" width=\"1024\" height=\"587\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-12.16.10-PM.png 1024w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-12.16.10-PM-300x172.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-03-at-12.16.10-PM-768x440.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>tada!<\/p>\n<\/div>\n<\/div>\n<h2>Change background color of activity pages<\/h2>\n<p>Having card banners is a great way to aid visual learning, but what if you wanted to change the entire background color of your CLIO pages to match the look-and-feel of the material?<\/p>\n<p>This is completely possible with just 3 small sections of CSS!<\/p>\n<div id=\"attachment_2352\" style=\"width: 306px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.14-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2352\" class=\"wp-image-2352 size-medium\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.14-PM-296x300.png\" alt=\"\" width=\"296\" height=\"300\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.14-PM-296x300.png 296w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.14-PM-768x778.png 768w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.14-PM-1010x1024.png 1010w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.14-PM.png 1172w\" sizes=\"auto, (max-width: 296px) 100vw, 296px\" \/><\/a><p id=\"caption-attachment-2352\" class=\"wp-caption-text\">The default white background on an activity.<\/p><\/div>\n<div id=\"attachment_2353\" style=\"width: 306px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.32-PM.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-2353\" class=\"wp-image-2353 size-medium\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.32-PM-296x300.png\" alt=\"\" width=\"296\" height=\"300\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.32-PM-296x300.png 296w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.32-PM-768x779.png 768w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.32-PM-1009x1024.png 1009w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-25-at-4.20.32-PM.png 1170w\" sizes=\"auto, (max-width: 296px) 100vw, 296px\" \/><\/a><p id=\"caption-attachment-2353\" class=\"wp-caption-text\">Modified activity background color to a cream color.<\/p><\/div>\n<div>\n<pre>:root\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0--material-cyan:\u00a0rgba(77,208,225,0.7);\r\n\u00a0\u00a0\u00a0\u00a0--material-cream:\u00a0rgba(255,248,220,0.7);\r\n\u00a0\u00a0\u00a0\u00a0<strong><em><span style=\"color: #ff6600\">--the-name-of-your-color:\u00a0#your-color-in-hex;<\/span><\/em><\/strong>\r\n}\r\n\r\n.content-container\u00a0{\r\n    background:\u00a0var(--material-cream);\r\n}\r\n\r\nmd-content\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0background:\u00a0inherit;\r\n}<\/pre>\n<\/div>\n<ul>\n<li><span style=\"text-decoration: underline\"><strong>:root { &#8230; }:<\/strong><\/span><strong>\u00a0<\/strong>this is the area in your CSS code where you can declare global colors using rgba\/hex and reference them anywhere else in your code, hence the name global.\n<ul>\n<li>The variable name HAS to begin with two dashes (<code>--<\/code>) and is case sensitive!<\/li>\n<li>To reference it, use <code>var(<em><strong><span style=\"color: #ff6600\">--the-name-of-your-color<\/span><\/strong><\/em>)<\/code>.<\/li>\n<\/ul>\n<\/li>\n<li><span style=\"text-decoration: underline\"><strong>.content-container { &#8230; }: <\/strong><\/span>all the activities, cards, images, text, you name it, fall under this container. Here&#8217;s a visual of what that means:\n<ul>\n<li><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-26-at-10.52.07-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2355 size-full aligncenter\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-26-at-10.52.07-AM.png\" alt=\"\" width=\"1004\" height=\"391\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-26-at-10.52.07-AM.png 1004w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-26-at-10.52.07-AM-300x117.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-09-26-at-10.52.07-AM-768x299.png 768w\" sizes=\"auto, (max-width: 1004px) 100vw, 1004px\" \/><\/a><\/li>\n<li>So, this means that <span style=\"color: #000000\"><b>content-container<\/b> contains a div called\u00a0<strong>md-content<\/strong>. As long as we set the background for <strong>content-container<\/strong>,\u00a0<strong>md-content<\/strong> should\u00a0<em>inherit<\/em> the background color from its parent container (content-container).<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"text-decoration: underline\"><strong>md-content { &#8230; }:<\/strong><\/span>\u00a0child div of content-container.<\/li>\n<li><span style=\"text-decoration: underline\"><strong>background<\/strong><\/span><span style=\"text-decoration: underline\">:<\/span>\u00a0the <em>inherit<\/em>\u00a0keyword makes this div\u00a0adapt the parent div&#8217;s\u00a0background style, which we&#8217;ve already set to our cream color.<\/li>\n<\/ul>\n<h2>Change styling of navigation banner<\/h2>\n<p>Cool, now our page is styled to match the look-and-feel of our course. But wait, what about this big orange banner at the top?<\/p>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.30.31-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2397 aligncenter\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.30.31-AM.png\" alt=\"\" width=\"908\" height=\"447\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.30.31-AM.png 908w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.30.31-AM-300x148.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.30.31-AM-768x378.png 768w\" sizes=\"auto, (max-width: 908px) 100vw, 908px\" \/><\/a>School spirit is great and all, but there might be times where these colors don&#8217;t align with your course content. Can we re-style this navigation banner? Yes!<\/p>\n<h3><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.36.54-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2398\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.36.54-AM.png\" alt=\"\" width=\"939\" height=\"427\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.36.54-AM.png 939w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.36.54-AM-300x136.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.36.54-AM-768x349.png 768w\" sizes=\"auto, (max-width: 939px) 100vw, 939px\" \/><\/a><\/h3>\n<p>Here&#8217;s how the navigation bar divs are laid out. The entire banner is contained in a div called\u00a0<strong>.nav-bar<\/strong>. Inside that, there&#8217;s a button to access all the activities, and that div is called\u00a0<strong>.nav-element<\/strong>. Finally, there&#8217;s the title of the banner which is called\u00a0<strong>#module-title<\/strong>.<\/p>\n<p>First off, let&#8217;s change the background color of our navigation bar. Since my course revolves around splash-pads, I&#8217;ll color it to a tint of cyan. Using what we learned before, this should be doable!<\/p>\n<div>\n<pre>.nav-bar\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0background:\u00a0#00B8D4\u00a0!important;\r\n}<\/pre>\n<ul>\n<li><span style=\"text-decoration: underline\"><strong>.nav-bar {}:<\/strong><\/span>\u00a0tells the browser to style this div in the following way&#8230;<\/li>\n<li><span style=\"text-decoration: underline\"><strong>background:<\/strong><\/span>\u00a0our preferred background color. Notice how we use\u00a0<strong>!important<\/strong>, the reason for this is because we want to override the current styling of the banner. Exercise caution when using this keyword, but because of the way CLIO is set up right now, this is required.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.51.41-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2399\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.51.41-AM.png\" alt=\"\" width=\"1497\" height=\"907\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.51.41-AM.png 1497w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.51.41-AM-300x182.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.51.41-AM-768x465.png 768w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-10.51.41-AM-1024x620.png 1024w\" sizes=\"auto, (max-width: 1497px) 100vw, 1497px\" \/><\/a><\/p>\n<p>Ahh, that&#8217;s much better! How about changing the text color of the title and the <strong>Activities\u00a0<\/strong>button?<\/p>\n<div>\n<pre>.nav-bar\u00a0#module-title\u00a0{\r\n\u00a0\u00a0color:\u00a0#d32f2f;\r\n\u00a0\u00a0font-weight:\u00a0bold;\r\n}\r\n\r\n.nav-element\u00a0{\r\n\u00a0\u00a0color:\u00a0#d32f2f;\r\n}<\/pre>\n<ul>\n<li><span style=\"text-decoration: underline\"><strong>.nav-bar #module-title {}:<\/strong><\/span> styling the title of our banner. Why are we using a <code>#<\/code>\u00a0symbol here? In CSS, you use <code>.<\/code>\u00a0to refer to\u00a0<strong>classes<\/strong> and <code>#<\/code>\u00a0to refer to <strong>IDs<\/strong>. The difference between those is that a\u00a0<strong>class<\/strong> can identify more than one element, while an <strong>ID<\/strong>\u00a0represents one unique element. <a href=\"https:\/\/www.htmldog.com\/guides\/css\/intermediate\/classid\/\">Learn more here.<\/a><\/li>\n<li><span style=\"text-decoration: underline\"><strong>color:<\/strong><\/span> new color of our text in HEX or RGBA.<\/li>\n<li><span style=\"text-decoration: underline\"><strong>font-weight:<\/strong><\/span> the boldness of our font.<\/li>\n<\/ul>\n<p><a href=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-11.30.51-AM.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2402\" src=\"https:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-11.30.51-AM.png\" alt=\"\" width=\"1024\" height=\"564\" srcset=\"http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-11.30.51-AM.png 1024w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-11.30.51-AM-300x165.png 300w, http:\/\/sites.la.utexas.edu\/kb\/files\/2019\/08\/Screen-Shot-2019-10-08-at-11.30.51-AM-768x423.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Yay!<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction This tutorial will cover how we can use CSS in order to style a CLIO page and improve students&#8217; learning experience. While styling CLIO, make sure that your visuals complement the overall material that&#8217;s trying to be taught. For &hellip; <a href=\"http:\/\/sites.la.utexas.edu\/kb\/2019\/08\/28\/making-clio-site-aesthetic-handy-coding-snippets\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":699,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[200704],"tags":[],"class_list":["post-2232","post","type-post","status-publish","format-standard","hentry","category-clio"],"_links":{"self":[{"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts\/2232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/users\/699"}],"replies":[{"embeddable":true,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/comments?post=2232"}],"version-history":[{"count":23,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts\/2232\/revisions"}],"predecessor-version":[{"id":3590,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/posts\/2232\/revisions\/3590"}],"wp:attachment":[{"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/media?parent=2232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/categories?post=2232"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/sites.la.utexas.edu\/kb\/wp-json\/wp\/v2\/tags?post=2232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}