Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding a background image to a single table cell

Tags:

html

css

joomla

Hello I was wondering if it's possible to add a background image to a single table cell? If you look at the image I have below I would like the green background image I have to be in those cells.

example image

My code for the table is,

<table class="TFtable" style="height: 448px;" width="1007">
<tbody>
<tr>
<td style="background-color: #000000;">
<p><span style="font-size: 200%; color: #749d36;">    Pricing</span></p>
<p><span style="font-size: 200%;">     Structure</span></p>
</td>
<td style="text-align: center;">
<p><span style="font-size: medium;">Professional</span></p>
<p><span style="font-size: medium;">Resume</span></p>
<br /><br />
<p><span style="font-size: xx-large; color: #749d36;">$199</span></p>
</td>
<td style="text-align: center;">
<p>Managerial</p>
<p>Resume</p>
<p>$299</p>
</td>
<td style="text-align: center;">
<p><span style="font-size: medium;">Executive</span></p>
<p><span style="font-size: medium;">Resume</span></p>
<br /><br />
<p><span style="font-size: xx-large; color: #749d36;">$399</span></p>
</td>
<td style="text-align: center;">
<p>C-Suite</p>
<p>Resume</p>
<p>$499</p>
</td>
</tr>
<tr>
<td style="text-align: center;"><span style="font-size: medium;">Resume Specs</span></td>
<td style="text-align: center;"><span style="font-size: small;">2-3 pg resume</span></td>
<td style="text-align: center;">4-5 pg resume</td>
<td style="text-align: center;">
<p>+ cover sheet and</p>
<p>graphics</p>
</td>
<td style="text-align: center;">+ standalone bio pg</td>
</tr>
<tr>
<td style="text-align: center;"><span style="font-size: medium;">Phone Interview</span></td>
<td style="text-align: center;"><img src="images/greentick.png" alt="" width="24" height="24" /></td>
<td style="text-align: center;"><img src="images/greentick.png" alt="" width="24" height="24" /></td>
<td style="text-align: center;"><img src="images/greentick.png" alt="" width="24" height="24" /></td>
<td style="text-align: center;">
<p><img src="images/greentick.png" alt="" width="24" height="24" /></p>
</td>
</tr>
<tr>
<td style="text-align: center;"><span style="font-size: medium;">Draft To Approve</span></td>
<td style="text-align: center;"><img src="images/greentick.png" alt="" width="24" height="24" /></td>
<td style="text-align: center;"><img src="images/greentick.png" alt="" width="24" height="24" /></td>
<td style="text-align: center;"><img src="images/greentick.png" alt="" width="24" height="24" /></td>
<td style="text-align: center;">
<p><img src="images/greentick.png" alt="" width="24" height="24" /></p>
</td>
</tr>
<tr>
<td style="text-align: center;"><span style="font-size: medium;">Template Options</span></td>
<td style="text-align: center;"> </td>
<td style="text-align: center;"> </td>
<td style="text-align: center; vertical-align: middle;"><br /><img src="images/greentick.png" alt="" width="24" height="24" /></td>
<td style="text-align: center;"><img src="images/greentick.png" alt="" width="24" height="24" /></td>
</tr>
<tr>
<td style="text-align: center;"><span style="font-size: medium;">Extras</span></td>
<td style="text-align: center;"> </td>
<td style="text-align: center;"> </td>
<td style="text-align: center;">
<p>+ free LinkedIn</p>
<p>profile</p>
</td>
<td style="text-align: center;">
<p>+ free LinkedIn</p>
<p>profile</p>
</td>
</tr>
<tr>
<td style="text-align: center;"><span style="font-size: medium;">Delivery</span></td>
<td style="text-align: center;">
<p>.docx &amp; .pdf</p>
<p>versions</p>
</td>
<td style="text-align: center;">
<p>.docx &amp; .pdf</p>
<p>versions</p>
</td>
<td style="text-align: center;">
<p>.docx &amp; .pdf</p>
<p>versions</p>
</td>
<td style="text-align: center;">
<p>.docx &amp; .pdf</p>
<p>versions</p>
</td>
</tr>
<tr>
<td style="text-align: center;"><span style="font-size: medium;">Cover Letter</span></td>
<td style="text-align: center;"><br />+ $50<br /><br /></td>
<td style="text-align: center;"><br />+ $50<br /><br /></td>
<td style="text-align: center;"><br />+ $50<br /><br /></td>
<td style="text-align: center;"><br />+ $50<br /><br /></td>
</tr>
<tr>
<td style="background-color: #000000; text-align: center;">
<p>If you're not sure where</p>
<p>your job would fit, please</p>
<p>get in touch to discuss </p>
<p>your requirements.</p>
</td>
<td style="text-align: center;">
<p>Vocations (such as</p>
<p>Teaching &amp; Nursing)</p>
<p>Early Career Professionals</p>
</td>
<td style="text-align: center;">
<p>Managers and Senior</p>
<p>Professionals (Lawyers,</p>
<p>Medical Doctors), BDMs,</p>
<p>Consultants...</p>
</td>
<td style="text-align: center;">
<p>Senior Managers and Exec</p>
<p>Directors (Operations</p>
<p>Managers, GMs, Heads of</p>
<p>Department</p>
</td>
<td style="text-align: center;">
<p>CEOs, CFOs, COOs, CIOs,</p>
<p>Managing Directors, Board</p>
<p>Members &amp; Non-Execs,</p>
<p>Practice Directors &amp; Principals</p>
</td>
</tr>
</tbody>
</table>
<p> </p>
like image 221
Endô Fujimoto Avatar asked Feb 10 '23 23:02

Endô Fujimoto


1 Answers

You could try:

<td style="background-image: url(PATH/TO/IMAGE);">

If you absolutely have to do it inline.

However using CSS would be way cleaner. Something like:

HTML:

<td class="green_background"></td>

CSS:

.green_background {
   background-image: url(PATH/TO/IMAGE.JPG);
}
like image 131
Leigh B Avatar answered Feb 14 '23 00:02

Leigh B