it's been some time since I did some coding so I'm basically a newbie in updated PHP (so please bear with me). I've created a basic draft related to new web I'm working on. I decided to include header.php file (as it's supposed be used on many other pages on that web and I don't want to code header info manually for each page).
index.php file is located in main folder, css, js and images each in a separate folder: web-folders-structure .
All seems to be working fine, but when I simulate either iPad or iPhone display - menu is not resized for those type of screens (even though css styles contain detailed specs for each case).
What it should look like: expected result
How it looks when header.php is included: distorted navigation
index1.php start of the code:
<?php include ("./inc/header.php"); ?>
<div id="wrap">
</div>
<!-- navigation -->
content of header.php file (located in "inc" folder):
<?php
//db start
$db = mysqli_connect("localhost", "root", "", "pokus",)
or die('Error connecting to MySQL server.');
//Set DB connection charset to utf-8
$db->set_charset("utf8");
?>
<head>
<title> EGYPTICA - svet starovekeho Egypta 2019 </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="sk">
<meta name="description" content="historia starovekeho Egypta">
<meta name="keywords" content="Egypt, staroveky Egypt, stary Egypt, Egyptica, egyptica, egyptologia, knihy, starovek, mumia, faraon, pyramidy">
<meta name="copyright" content="Copyright (c) 2019 Jana Rusnakova">
<meta name="author" content="Jana Rusnakova">
<meta name="robots" content="noindex, nofollow">
<link rel="stylesheet" href="./css/menumaker.css" type="text/css" />
<link rel="stylesheet" href="./css/main-styles.css" type="text/css" />
</head>
<body>
I tried to remove include and insert meta tags directly into index1.php and that works fine on all type of displays. However once I use include (of header) - when I check small screens (tablet, mobile phone) it doesn't work properly.
Any advise as to what could cause this?
Thx