Jump to content

CSS file not linking correctly after using PHP include


Recommended Posts

I can't get my css file to link correctly after moving the CSS file call into another PHP file and including it into my main page. The file seems to get included into display.php because the top menu bar is styled correctly; however, the content pulled in via pages.php doesn't have the css applied to it.




<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" id="kynxin">
<base href="http://kynxin.com/" />
<title>Kynxin<?php echo " $section"; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="verify-v1" content="" />
<meta name="keywords" content=""  />
<meta name="description" content="" />
<meta name="author" content="Kynxin Development Team" />
<meta name="robots" content="index, follow" />
echo $css_header;
<link rel="stylesheet" href="style.css" media="screen" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="http://www.area51entertainment.co/TouchIcon.png" />
<link rel="apple-touch-icon-precomposed" href="http://www.area51entertainment.co/TouchIcon.png" /> 
<link rel="image_src" href="./logo.png" /> 
<script src="float.js"></script>
<script src="ajax.js"></script>
<div class="wrapper">
<div id="header_float">
<div class="header_wrapper">
<div class="logo">
<a href="./">Kynxin</a>
/*Generate menu array*/
$menu_array = array();
$menu_array['loggedin'] = array("Home" => "/home", "Stream" => "/newsstream", "Notes" => "/notifications", "Req" => "/requests", "Msgs" => "/messages");
$menu_array['loggedout'] = array("Music" => "/music", "Movies" => "/movies", "Television" => "/television", "Games" => "/games", "Videos" => "/videos", "Browse People" => "/people");
$search['menu_items']=array("People" => "people", "Music" => "music", "Movies" => "movies", "Television" => "television", "Games" => "games", "Videos" => "videos");

/* logic to determine which menu to use*/
if(isset($_SESSION['username'])){ $type = 'loggedin'; } 
else { $type = 'loggedout'; }

/*Search Form*/
<fieldset class="search_box">'."\n";
$search_form.=menu($search['menu_items'], "select")."\n";
$search_form.='<input type="text" name="search_input" id="search_input" placeholder="Search for..." /> <input type="submit" value="Go" name="search_go" id="search_go" /> <!--Launch Music Player-->

/*Links Wrapper*/
echo '<div class="links';if($type=="loggedout"){ echo '2'; } echo '">',"\n";
echo menu($menu_array[$type]);
echo "</div>","\n";
echo '<div class="links_search">',"\n",
'<div class="links_right">
Profile Link/Settings/<a href="./logout.php">Sign-Out</a>
echo '<div class="links_right2">',"\n",
<!--[if lt IE 7]> 
<div style=\' clear: both; height: 59px; padding:0 0 0 15px; position: relative; top: 37px;\'> 
<a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
<img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /></a>
<div class="javascript">
<div class="javascript_wrapper">
We\'ve noticed you have Javascript turned off. <br /> While it\'s not absolutely required to have Javascript turned on to use our site; it is highly recommended.
echo '</div>',"\n",$footer;
header("Location: ./");


index.php in root:

require_once 'pages.php';
require_once 'display.php';


index.php in signup folder:

<style type="text/css">.hide{display: none;}</style>
</noscript>'."\n".'<link rel="stylesheet" href="/signup/signup_style.css" media="screen" />'."\n";

$footer='<script src="membership.js"></script>'."\n";
$onload_session = $_SESSION['register_membership_type'];
$onload_session = preg_replace("/\r?\n/", "\\n", addslashes($onload_session));
$footer.='<script type="text/javascript">'."\n".
'<div id="register_day_store"></div>'."\n".
'<div id="register_month_store"></div>'."\n";
require_once '../display.php';

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.