0

I looked for answers to this question but was unable to find any.

I'd like to know how to use UIkit components. I'm creating a simple page (HTML/CSS) and I can't use UIkit's functionalities. For example, I'd like to use the tooltip component. Here is the code I'm using to "bring in" the relevant css/js components in the header(don't know the term):

<!-- Tooltip CSS -->
<link rel="stylesheet" type="text/css" href="css/components/tooltip.css">

<!-- Tooltip Javascript -->
<script src="js/components/tooltip.js"></script>

The paths to the folders are correct - I thought my formatting of these links might be wrong. Please let me know what other info you might need. Thanks!

1 Answers1

0

Your are missing files, and you have a typo in your css link / is missing before >

You need to insert the basic uikit css/js files and then add additional components.

<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <link rel="stylesheet" href="uikit.min.css" />
        <script src="uikit.min.js"></script>
    </head>
    <body>
    </body>
</html> 

This is the minimum you need to put on your page for uikit to work. Then if you want to add components you can add their files afterwards.

<html>
    <head>
        <title></title>
        <link rel="stylesheet" href="uikit.min.css" />
        <link rel="stylesheet" href="tooltip.css" />
        <script src="uikit.min.js"></script>
        <script src="tooltip.js"></script>
    </head>
    <body>
    </body>
</html> 

Of course, make sure the path to your files is correct.

Samuel
  • 781
  • 5
  • 22