I have an issue where I have one page that has it's own css file and I am including, using
include $_SERVER[DOCUMENT_ROOT].'path/file.php';
to include a banner which has it's own css file but they share similar classes, is there a way I can stop the two css files from bleeding into each other?
Edit:
Ok so to elaborate on my question because I know that it is very vague, what I am trying to do is to get the page the user visits, this one here:
<?php include $_SERVER['DOCUMENT_ROOT'].'/aaron/portfolio/banner.php'; ?><!doctype html><html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<link rel="shortcut icon" type="image/ico" href="/wyeweb/img/wyelearn.ico"/>
<link rel="stylesheet" type="text/css" href="/wyeweb/css/bootstrip.css" />
<link rel="stylesheet" type="text/css" href="/wyeweb/css/otherCss.css" />
<script src="/wyeweb/js/jquery.js" type="text/javascript"></script>
<script type="text/javascript" src="/wyeweb/js/bootstrip.js"></script>
<script src="/wyeweb/js/CSS3_Media.js" type="text/javascript"></script>
<script src="/wyeweb/js/respond_min.js" type="text/javascript"></script>
<title>
| Home
</title>
</head>
<body>
<div class="container col-md-offset-3">
<div class="container col-md-8"><a href="/wyeweb/index.php"><img class="logo-size" src="img/wyeLogo.jpg" alt="Logo"></a></div><!--Logo-->
<div class="col-md-4 address">
<a href="http://www.facebook.com/...">
<img src="/wyeweb/img/face.jpg" alt="facebook">
</a>
<a href="http://www.twitter.com/...">
<img src="/wyeweb/img/twit.jpg" alt="twitter">
</a>
<a href="http://www.linkedin.com/company/...">
<img src="/wyeweb/img/link.jpg" alt="linkedin">
</a>
<br/><br/>
<a href="...">
...<br/>...<br/>...<br/>...
</a>
</div><!--address with link to gmaps-->
</div>...
To call the CSS files at the top but the page ignores these files and calls all classes from the CSS files at the top of the included page here:
<?php
$output = 'AN Web Design | %title%';
if($_SERVER['REQUEST_URI'] == '/aaron/portfolio/wyeweb/')
{
$output = str_replace('%title%', 'Wyelearn', $output);
}
elseif($_SERVER['REQUEST_URI'] == '/aaron/portfolio/portal/')
{
$output = str_replace('%title%', 'Concept', $output);
}
//elseif($_SERVER['REQUEST_URI'] == '/aaron/prtf.php')
//{
// $output = str_replace('%title%', 'Portfolio', $output);
//}
else
{
$output = str_replace('%title%', 'View', $output);
}
?>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title><?php echo $output ?></title>
<link rel="shortcut icon" type="image/png" href="/aaron/IMG/r1ico.jpg" />
<link rel="stylesheet" type="text/css" href="/aaron/css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="/aaron/css/strap_overwrite.css" />
<script src="/aaron/js/jquery.js"></script>
<script src="/aaron/js/bootstrap.js" type="text/javascript"></script>
<script src="/aaron/js/CSS3_Media.js" type="text/javascript"></script>
<script src="/aaron/js/respond_min.js" type="text/javascript"></script>
</head>
<body>
<div class="banner">
<div>
<nav class="navbar navbar-default" role="navigation">
<div>
<div class=" container">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle Nav Bar</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.php">AN Web Design</a>...
So what I want to do is get the page the user visits to ignore the called files at the top of the above page and only use the ones from the main page. Is there a way to do this?
</div>