Hi I have the folowing problem:

The css wont apply to html although everything is corectly

<link href="../../../../default.css" rel="stylesheet" type="text/css" media="all" />


<h4><?php echo $gamename[2]; ?></h4>

and in the css i have the following

h4 {
    color: #FFF;
    font-size: large;
    font-family: "Courier New", Courier, monospace;
4 Years
Discussion Span
Last Post by stbuchok

Your page doesn't even have an h4 tag, so how do you know it's not working, not to mention what pritaes said?


if the file is at the document root, or a subfolder of the root, it is often more convenient to reference the root, the path is a constant regardless of the depth of the folder structure the site attains
<link href="/default.css" rel="stylesheet" type="text/css" media="all" />
<link href="/css/default.css" rel="stylesheet" type="text/css" media="all" />

Edited by almostbob


The css is at the root of the document is working properly for Div's and background but not for p and h4

@charset "utf-8";
/* CSS Document */

body {
    background-position:top left;

try body { backround:url(images/background.jpg) #000 no-repeat top left; }
small is beautiful

cant see a definition of h4 or p in the css,

try to get away from px as dimensions, they dont work,
on anything except the screen you laid it out on.
em or % are current best practice, scalars that auto adjust to almost every device, fixed width elements push offscreen in partscreen windows or small devices, users usually wont scroll right, mice dont have hscroll wheels

Edited by almostbob


ok so I just realized that the url you gave is not the url the problem is on, apparently you have to navigate to it. Next time, just put the url of the actual issue.


Also, there is no <H4 tag anywhere on the page, no where, notta. If you view source, there is not a single <h4 tag.

This is what I see for the <div id="content"> div:

<div id="content">
<table><tr><td align="center"><a href="jocuri/Ghosts_Vs_Zombies" style="text-decoration:none"><img src="jocuri/Ghosts_Vs_Zombies/image.php" style="display:block" />Ghosts Vs Zombies</a></td><td align="center"><a href="jocuri/Ninja_vs_Zombie" style="text-decoration:none"><img src="jocuri/Ninja_vs_Zombie/image.php" style="display:block" />Ninja vs Zombie</a></td><td align="center"><a href="jocuri/Boom_Zombie" style="text-decoration:none"><img src="jocuri/Boom_Zombie/image.php" style="display:block" />Boom Zombie</a></td><td align="center"><a href="jocuri/Trojan_Hero" style="text-decoration:none"><img src="jocuri/Trojan_Hero/image.php" style="display:block" />Trojan Hero</a></td><td align="center"><a href="jocuri/Cake_Cafe" style="text-decoration:none"><img src="jocuri/Cake_Cafe/image.php" style="display:block" />Cake Cafe</a></td></table><br>

So either you haven't updated the proper files or you have PHP that causes it not to render. At any case it's not on the page, plese just view source and you will see.

Edited by stbuchok: needed to add more info


I changed the link to absolute path but still doesnt work. What else could i do?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.