Blocks that use CSS

Are there blocks that accept CSS or are they just for HTML? I want to create a new Homepage menu using CSS using a block. Has anyone had any experience doing this?

  • 556
  • More
Replies (5)
    • Hello Will Roberts !

      It's possible to do via the RAW block. But in UNA 12 you may add the CSS code to the Injections settings of every page.

      • That's the beauty of UNA, very flexible, a lot of room for devs to play… 😊

        Just look at the custom pages here at UNA using custom code in blocks, or the splash page…

            https://una.io/page/start

            https://una.io/page/features

        In raw blocks you can add your own css and html code, or can use/apply the already available UNA styling to your menus https://una.io/samples/interface.php so many options, just got to watch out for responsiveness in small devices too.

        • I dont really code much but I usually copy and paste and change that way. I know some HTML but some of the stuff I want to do requires both HTML and CSS. All I see is places to put HTML code but nowhere to put the CSS code

          • Good question....

            First you can create your own custom menu in Studio > Navigation 

            Then, add a menu block in Pages, and assign your created menu to that block

            Then, Browser Inspector can be use to identify classes name that you want to style.  

            Your css can be injected in Studio Pages by Selecting the page where the menu is located, and under Settings of that page, there is Injections boxes, for styles use the "In Head" and put your css in there using the <style> tag.

            • You can use the style tag to add css to an html document, if it's something simple.  More elaborate css should be a separate file that is called.  Do either in head injections

              <style>

              css goes between style tags

              </style>

              OR

              >
              <link rel="stylesheet" href="path/style.css">

              Login or Join to comment.