php code inside `<style></style>` definitions
-
why the next code works outside of wordpress, in my localhost directory (www) and when i place the same file inside my wordpress template directory it isn’t able to show the background-image of the
/div
:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<style type="text/css">
<!--
#chest{color:red;
background:yellow;
background-image: url(<?php echo 'screenshot.png' ?>);
}
-->
</style>
</head>
<body><div id="chest">
<p>mama</p>
</div></body>
</html>in fact i want to change with php the background of the div accordingly to what cathegory is on.
can u give me some advice?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘php code inside `<style></style>` definitions’ is closed to new replies.