1

appreciate anybody who can help in this - i cannot see my css styling in browser view:

using f3:

$f3->route('GET /',
  function ($f3) {
    $f3->set('html_title','XXX Home');
    $f3->set('content','homepage.html');
    echo Template::instance()->render('layout.html');
  }
);

my layout.html (all my css is in a "css" folder) is:

<!DOCTYPE html>
<html>
   <head>
      <title>{{ @html_title }}</title>
    <!-- PLUGIN STYLESHEETS -->
    <link rel="stylesheet" media="all" href="/css/reset.css" />
    <link rel="stylesheet" media="all" href="/css/responsive.gs.12col.css" />

    <!-- THEME STYLESHEETS -->
    <link rel="stylesheet" media="all" href="/css/theme.css" />
    <link rel="stylesheet" media="all" href="/css/shortcodes.css" />
    <link rel="stylesheet" media="all" href="/css/responsive.css" />
    <link rel="stylesheet" media="all" href="/css/color.css" />

    <!-- JAVASCRIPT PLUGINS -->
    <script type="text/javascript" src="/scripts/jquery.1.11.1.min.js"></script>
    <script type="text/javascript" src="/scripts/modernizr.custom.97074.js"></script>
   </head>
   <body>
      <include href="{{ @content }}" />
   </body>
</html>

Is there anything wrong with the code?

8
  • Are there any error messages in the console of the browser debugger?
    – RoToRa
    Feb 25, 2020 at 9:21
  • Loading failed for the <script> with source “..../scripts/jquery.1.11.1.min.js”.
    – April
    Feb 25, 2020 at 10:06
  • Have you placed that file (and the other css/js files) at that location on your server?
    – RoToRa
    Feb 25, 2020 at 10:26
  • BTW, jQuery 1.11 is ancient. It would be a very bad idea to use it. As a beginner it would be a good idea to avoid jQuery altogether and first learn to use JavaScript without it.
    – RoToRa
    Feb 25, 2020 at 10:28
  • 1
    You should prepend css and script path with {{@BASE}}, e.g. {{@BASE}}/css
    – roel
    May 28, 2020 at 12:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.