php include file also include the style of this file

343
April 06, 2017, at 9:24 PM

i have a PHP codes in index.php like this:

<?php
$modal = @$_GET["mod"];
switch ($modal){
    default:
    include "blank.php";
    break;
    case "video":
    include "video.php";
    break;
}
?>

In my video.php i have some text:

<p> Welcome, this is video page </p>

When i am clicking:

<a href=index.php?mod=video> This is nice video </a>

I am getting the message "Welcome this is video page" until here everything is working...

The problem is when i am putting the paragraph inside in div, my paragraph is hiding...

<div style="z-index:3;position:fixed;height:100%;width:100%;background-color:black;>
    <p> Welcome, this is video page </p>
</div>

The question is: How to activate this div style ? I want to see this div style.

Answer 1

Error code demo

Error: You missed " in style

Replace this to:

<div style="z-index:3;position:fixed;height:100%;width:100%;background-color:black;>
    <p> Welcome, this is video page </p>
</div>

This:

<div style="z-index:3;position:fixed;height:100%;width:100%;background-color:black;">
   <p> Welcome, this is video page </p>
</div>
Answer 2

You're missing a " after background-color:black;:

<div style="z-index:3;position:fixed;height:100%;width:100%;background-color:black;">
    <p> Welcome, this is video page </p>
</div>

But the default will be black on a black background so be sure to change the text color.

Also as noticed by @JustOnUnderMillions :

<?php
$modal = @$_GET["mod"];
switch ($modal){
    case "video":
    include "video.php";
    break;
    default:
    include "blank.php";
    break;
}
?>

default should always be the last element of your switch.

Rent Charter Buses Company
READ ALSO
How to change stacking order of bg image?

How to change stacking order of bg image?

How can I make it so that the mouth, eyes, and eyebrows appear on top of the face without changing the html? (The mouth is in the wrong position so I can see it)

314
Override path resolve for css bundling in webpack

Override path resolve for css bundling in webpack

Based on the https://githubcom/davezuko/react-redux-starter-kit repo which uses Webpack, I'm trying to implement a build process that overwrites *

545
Regex - how to replace css when not inside of html

Regex - how to replace css when not inside of html

Alright, so I've been looking around for quite a while trying to figure out how to get this to work outSo what I'm trying to do is replace anything in strings that looks like this:

269