Forums / Templates, Stylesheets, Page Layout / How to run PHP in a table cell with a BG image..?

How to run PHP in a table cell with a BG image..?

Locked

Views: 2,060

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
27 Feb 2009, 5:35 AM
#1
gemohler avatar

gemohler

Zen Follower

Join Date:
Jul 2005
Location:
CA
Posts:
223
Plugin Contributions:
0

How to run PHP in a table cell with a BG image..?

Im trying to execute a PHP script from within a table cell.

..I can do that, works great. Or I can define the PHP script with no image, and that works great as well.

Then..i want to add an image to that cell, the sits behind the form dropdown..then I get script, but no image.

The code im using to define the cell:

  <td>
  <style type="text/css">
  body
  {
  background-image: url('images/hawk-bg-image.jpg')
  background-repeat: no-repeat
  }
  </style>
  <?php include ('header_code.inc.php'); ?>
  </td>

The test page:

http://www.e-brakes.com/define_main_page.php

What am I doin wrong?

27 Feb 2009, 5:47 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,682
Plugin Contributions:
0

Re: How to run PHP in a table cell with a BG image..?

Give the <td> a class and put the CSS in the main stylesheet.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

27 Feb 2009, 5:53 AM
#3
gemohler avatar

gemohler

Zen Follower

Join Date:
Jul 2005
Location:
CA
Posts:
223
Plugin Contributions:
0

Re: How to run PHP in a table cell with a BG image..?

Got it..

  <td  style="background-image:url(images/hawk-bg-image.jpg);background-repeat:no-repeat"> 
  <?php include ('header_code.inc.php'); ?>
    </td>

Hope this helps someone in the future.

27 Feb 2009, 10:12 AM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: How to run PHP in a table cell with a BG image..?

gemohler:

Got it.'fraid you didn't.

Kim is suggesting that you put something like this in your template> <td class="pageHeaderCell">

<?php include ('header_code.inc.php'); ?> </td>and this in your stylesheet .pageHeaderCell { background-image:url(images/hawk-bg-image.jpg); background-repeat:no-repeat" }which is means that all your styling would be in your stylesheet and easier to find if you wanted to change it again in the future.

I'd go further and wonder why you're putting this in a table cell - a rather old-fashioned and nowadays unnecessary complication.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)