2 replies [Last post]
hezza
hezza's picture
Offline
newbie
Last seen: 2 years 29 weeks ago
Joined: 2012-01-31
Posts: 2
Points: 3

Hi All!
Got a little irritating problem going on, and would be grateful if someone could help me out! Smile

I have created a style sheet and the way I link a particular php script to the CSS is by doing the following in the php script:

<style type="text/css" media="screen">
 
@import url("http://www.blahblahblah/styles/style.css");
 
</style>
 
<style type="text/css" media="screen">
 
.content {
 
background:url('../images/bg002.jpg');
}
 
</style> 

Now at the top of each php script, I have defined the page specific variables (e.g. define("BACK_IMAGE, "bg003.jpg") ).

What I want to do is change  background:url('../images/bg002.jpg'); and include these defined variables. I have tried a number of times and attempts include:

- background: url('images/<?php echo BACK_IMAGE;?>') no-repeat;

but they just don't seem to work :S

Can someone point me in the right direction? I'd be very grateful Smile

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 1 week 4 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2037
Points: 2256

Show the rendered markup.

Show the rendered markup.

I consider this a Triumph.

hezza
hezza's picture
Offline
newbie
Last seen: 2 years 29 weeks ago
Joined: 2012-01-31
Posts: 2
Points: 3

Sorry, what do you mean

Sorry, what do you mean exactly?