Home > Mobile >  XAMPP not loading CSS files
XAMPP not loading CSS files

Time:11-11

  • I am running Ubuntu on a VM.
  • I installed XAMPP.
  • htdocs is the root directory.
  • File in question: htdocs/index.php
  • CSS Directories: htdocs/css/, htdocs/lib/

When I enter "https://localhost/home/index.php" in the search bar, only the html loads.

I have ran XAMPP on Windows for over a year and never had any problems.

I have tried several solutions already online and none of them have made any difference.

htdocs/index.php:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Template</title>
        <meta content="width=device-width, initial-scale=1.0" name="viewport">
        <meta content="" name="keywords">
        <meta content="" name="description">

        <!-- Favicons -->
        <link href="img/favicon.png" rel="icon">
        <link href="img/apple-touch-icon.png" rel="apple-touch-icon">

        <!-- Google Fonts -->
        <link href="https://fonts.googleapis.com/css?family=Open Sans:300,300i,400,400i,700,700i|Montserrat:300,400,500,700" rel="stylesheet">

        <!-- Bootstrap CSS File -->
        <link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">

        <!-- Libraries CSS Files -->
        <link href="lib/font-awesome/css/font-awesome.min.css" rel="stylesheet">
        <link href="lib/animate/animate.min.css" rel="stylesheet">
        <link href="lib/ionicons/css/ionicons.min.css" rel="stylesheet">
        <link href="lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
        <link href="lib/lightbox/css/lightbox.min.css" rel="stylesheet">

        <!-- Main Stylesheet File -->
        <link href="css/style.css" rel="stylesheet">

        <!-- =======================================================
        Theme Name: Template
        Theme URL: https://bootstrapmade.com/bizpage-bootstrap-business-template/
        Author: BootstrapMade.com
        License: https://bootstrapmade.com/license/
        ======================================================= -->
    </head>

    <body>

This is such a petty issue. Any help would be appreciated.

CodePudding user response:

Have you tryed to reset your Browser Cache?

Shortcut for that is SHIFT F5

CodePudding user response:

You may be using browser caching? Maybe just try a hard refresh CTRL F5 (Sorry if this is obvious but try it out)

OR

You can Use this while linking Css:

<link href="style.css?<?=filemtime("style.css")?>" rel="stylesheet" type="text/css" />
  • Related