-
[RESOLVED] css with php
hi can anyone help me please i need to change the background of my page everyday, but im having a problem with css.
i understand the you cant use php in a ccs style file
i have tryed a couple of ways but getting know were with this.
PHP Code:
div#header {
color: #9C9CFE;
background: #303030 url(header.jpg) no-repeat;
height: 180px;
width: 100%;
}
i need to change header.jpg ever time, i have tryed
PHP Code:
div#header {
color: #9C9CFE;
background: #303030 url(<?php $picheader;?>) no-repeat;
height: 180px;
width: 100%;
}
but it will not work.
$picheader will have the background pictures path, this will change ever day..
-
Re: css with php
You need to "echo" that value like this:
PHP Code:
div#header {
color: #9C9CFE;
background: #303030 url(<?php echo $picheader; ?>) no-repeat;
height: 180px;
width: 100%;
}
:wave:
-
Re: css with php
thanks for your help solved the problem...:thumb::thumb::thumb::thumb::thumb::thumb::thumb: