Forum Moderators: coopster

Message Too Old, No Replies

PHP Functions in dreamweaver dont show css styles

         

ryan_b83

2:31 pm on Aug 25, 2006 (gmt 0)

10+ Year Member



Hello, sorry I am not sure if this is a PHP, CSS, or Dreamweaver question, or just one big combonation of all of them. Basiclly here is my problem. When i make a website i template it with PHP function calls.

For a very basic example:

<html>
<head>
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="styles/main.css">
</head>

<body>
<table width="80%" border="0">
<tr>
<td><h1>this is a h1 </h1></td>
<td><h2>This is a h2 </h2></td>
<td><h3>This is a h3 </h3></td>
</tr>
</table>
</body>
</html>

That example would be changed to this:

<?
include('functions.php');
display_top();
?>

<table width="80%" border="0">
<tr>
<td><h1>this is a h1 </h1></td>
<td><h2>This is a h2 </h2></td>
<td><h3>This is a h3 </h3></td>
</tr>
</table>

<?
display_bottom();
?>

So the display_top(); and display_bottom(); functions display the appropriate code to maek the template. Now the problem comes in dreamweaver when you do this it does not pick up the CSS style sheet and render it in design view. Does anyone know any other way to call teh style sheet in a way that dreamweaver will render it? (other than of course stating it in the html portion on every page.

Once again, not sure if this is teh right topic section, but thanx!

Ryan

henry0

5:18 pm on Aug 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is the whole page a template?
and is another class processing it?

then it could be that the processing class reads elements of the page as an array thus not parsed

Try to throw this in a new field:
<<<

<link rel="stylesheet" type="text/css" href="styles/main.css">

>>>

And include it as you do for the other contents using display_link_rel()