Jump to content

CSS Problem with Virtual Server


julelustig

Recommended Posts

Hi there!

searching the forums dint get me anywhere, so I try direct posting ;) Here we go...
I'm running an intranet at work and for that purpose I installed a virtual server (that's omnisecure here) and PHP (newest version).

I configured the server and the localhost showed me the correct pages. Just without CSS. How do I teach PHP to parse the CSS-data as well?

I checked the CSS itself, it works fine within an .html and the explorer reads it correctly. Just within the server environment it all goes wrong.

What's to do? Feel free to give some advice :) Oh, but I'm no hacker, so please speak slowly and un-complicated ;)

Cheers and thanks anyone reading this,
Jule
Link to comment
Share on other sites

CSS isn't utilized by PHP. You can, though, use CSS in the HTML that your PHP script outputs. For example, say you create a 'header' file for the top of your page that contains HTML and the standard HTML tags like <head> and so on. You'd place your CSS link tag in the <head> section like you would normally. Then call the header into your scripts like:

include 'header.php';

Then, say you want to have some HTML mixed into your script:

echo "<table><tr><td class='[b]yourCSSclasshere[/b]'";
echo "<font class='[b]yourCSSclasshere[/b]'>blah blah blah</font>";
echo "</td></tr></table>\n";

Like that.

Link to comment
Share on other sites

Thanks for your replies!

[quote author=simcoweb link=topic=121484.msg499622#msg499622 date=1168244240]
Then call the header into your scripts like:

include 'header.php';

Then, say you want to have some HTML mixed into your script:

echo "<table><tr><td class='[b]yourCSSclasshere[/b]'";
echo "<font class='[b]yourCSSclasshere[/b]'>blah blah blah</font>";
echo "</td></tr></table>\n";
[/quote]
Mmmh simcoweb,
thanks especially for this. But i didn't get that part thouroughly. I DID include a header section in my standard page:

[code]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>intranet .:*:. Dienstplan</title>
<?php include("tec/top.inc"); ?>[/code]

just with the usual stuff, like script includes, and css include.
top.inc, the header section, holds this:

[code]  <link rel="stylesheet" type="text/css" href="tec/style.css">
<script type="text/javascript" src="tec/script1.js"></script>
</head>

<body>

<table width="100%" height="100%" border="0"> .....
[/code]
Ah, and i forgot one thing: if i put it on a "real" webserver, the pages are presented correctly. AND: if i try this a t home, with the same virtual server and the same code, IT WORKS!  If i tell the browser to show me the source code, it shows evrythin, all the includes like it should be. Doing the same with the version on the virtual server AT WORK the source code starts at <body> from the top.inc. Dunno why, had been checked with the MSIE, dunno about other browsers, since they don't use those at work.

So it must be a server problem? Whats the difference between the virtual server i got at work and the one i use online? Strange.
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.

Guest
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.