0

I can't get my css file to load with my .php file. so I created an identical file and saved it as .html, the html file works fine (except for the php code, of course) but the .php just shows up without any formatting. Can anyone help me with this? Oh, and the css file works with other .php pages just fine

Before I did this I was using the .master class and it was working, but when I tried to extend a header through it even it stopped working. Thank you in advance for any help y'all can give. NOTE: the .HTML file is in the CSS section of code, sorry.

CSS file,

.tajc {


color: #926D6D;
background-color:#2E43C6;
width: 100%;
height: 55px;
overflow: hidden;
display: inline-block

}

.tajc button {

background-color:#696969;
font-family: helvetica;
font-size: 16px;
text-align: center;
padding: 15px 32px;
 border: none;
 text-transform:uppercase;
}





.master {

color: #000;
background-color: #14B990;
/*font-family: helvetica;
font-size: 19px;
text-align: center;
/*padding: 0vh;
text-transform:uppercase;*/
width: 100%;
height: 55px;
overflow: hidden;
float: left


}





.master h1 {

font-size: 26px;
color: #000;
font-family: helvetica;
text-align: center;
text-decoration: none;
text-transform:uppercase;

}


.master button {


background-color:#696969;
font-family: helvetica;
font-size: 16px;
text-align: center;
padding: 15px 32px;
 border: none;
 text-transform:uppercase;


}

.master a {
font-size: 13px;
color: #000;
font-family: helvetica;
text-align: center;
text-decoration: none;

}



HTML file;



<?php


session_start();
include 'dbh.php';

?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
<div id="tajc"> 

<form>
<button>test button</button>

<?php

echo $_SESSION['first'];

?>


</form>






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

.PHP file;

<?php


session_start();
include 'dbh.php';

?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
<div class="tajc">  

<form>
<button>test button</button>

<?php

echo $_SESSION['first'];

?>


</form>






</div>
</body>
</html>
Wayne
  • 1
  • 1
  • 1
    maybe you're running this as `file:///` rather than on localhost? – Funk Forty Niner Apr 25 '17 at 23:54
  • Indeed. Do you have a web server of some sort running your PHP ? – WilomGfx Apr 25 '17 at 23:56
  • You're right, I was running as a file, when I ran it through the localhost it did the same as the php file. And im using XAMPP, but like I said, the same CSS file works fine with other pages. – Wayne Apr 25 '17 at 23:57

0 Answers0