0

So, i know this question has been asked before, but it has been resolved in ways that still doesn't work for me, bootstrap css is working, however my stylesheet is not loading, but i can see the css code fine when i inspect the page.

layout.blade.php

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>@yield('title')</title>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" type="text/css" />
    <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
    {!! Html::style( asset('css/main.css')) !!}
</head>
<body>
<div class="mycont">
<nav id="mynav" class="navbar navbar-default navbar-static-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">Eli Hood</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">

            <ul class="nav navbar-nav navbar-right">

                <li><a href="/">Home</a></li>
                <li><a href="/login"> Login </a></li>
                <li><a href="/register">Register</a></li>

            </ul>
        </div><!--/.nav-collapse -->
    </div>
</nav>




        @yield('content')



<footer>

</footer>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
    <script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
    <script type="text/javascript" src="https://getbootstrap.com/dist/js/bootstrap.min.js"></script>

</div>
</body>
</html>

Any suggestions, could it be an interference with https and http ?

4
  • see the console ... any 404 error? Commented Dec 26, 2016 at 19:11
  • im not at home right now i cant check, i will when i get back. Commented Dec 26, 2016 at 19:19
  • thats ok ... thanks Commented Dec 26, 2016 at 19:20
  • Instead {!! Html::style( asset('css/main.css')) !!}, you can try {{asset('css/main.css')}}. This should be enough. Commented Dec 27, 2016 at 0:39

1 Answer 1

1

You may try this:

<!-- /public/css/main.css -->
<link href="{{ asset('css/main.css') }}">

When using Html::style, use Html::style('css/main.css') without asset() function.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.