Jump to content

CSS inside PHP condition?


adredz

Recommended Posts

I've googled it but the results didn't satisfy me.

I wan't to make a php condition block that puts a background to a division when the current page is not the home page. My css code is within an external file and it has a block of code as follows:

 

#page {

  background-image: url('images/page_background.png');

  background-repeat: repeat-y;

  width: 900px;

  height: 700px;

}

 

In my_file.php I have this condition:

 

<?php  if (!(is_page('home_page))) { ?>

   

    How do I call #page from here?

 

<?php } ?>

Link to comment
https://forums.phpfreaks.com/topic/183355-css-inside-php-condition/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.