473,566 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I place an image in a specific table cell?

1 New Member
I'm brand new to html and css, and I'm trying to place an image in the cell below "Merry Christmas" . I presently have ttttttt to mark the area, but no text will be in here. The table is placed on top of another image, which is 1400 x 1050. The image I'm trying to place is 100 x 700, but can be resized. I'd like it to be close, or exactly fitted. Here is the code so far, and thank you in advance.

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="keywords" content="html5, css, Broward Calendar, December"/>
  5. <meta charset="UTF-8"/>
  6. <title>December Calendar</title>
  7.  
  8. <!--Looking forward to Christmas-->
  9.  
  10. <style type="text/css">
  11. table, td, th 
  12. {
  13.     border:1px color:#392822
  14. }
  15. </style>
  16.  
  17. <style type="text/css">
  18. table, td 
  19. {
  20.     vertical-align:top; padding:3px; color:#ffffff;
  21. }
  22. </style> 
  23.  
  24. <style type="text/css">
  25.  
  26. table
  27. {
  28. width:800px
  29. }
  30.  
  31. td
  32. {
  33. width:100px; height:100px; color:#8deafd;
  34. }
  35.  
  36. </style>
  37.  
  38. <body>
  39.  
  40.  
  41. <div class="background-image">
  42. <img src="calendar/images/dec.jpg" alt="December calendar Broward College holiday schedule">
  43.  
  44. <div style="position:absolute; top:400px; left:300px; width:800px; height:800px">
  45.  
  46.  
  47. <table border="1">
  48. <caption><h2>December 2013</h2></caption>
  49.  
  50.  
  51. <tr>
  52. <th>Sun</th>
  53. <th>Mon</th>
  54. <th>Tue</th>
  55. <th>Wed</th>
  56. <th>Thu</th>
  57. <th>Fri</th>
  58. <th>Sat</th>
  59. <th>Merry Christmas</th>
  60. </tr>
  61.  
  62.  
  63. <tbody>
  64. <tr>
  65. <td>1</td>
  66. <td>2</td>
  67. <td>3</td>
  68. <td>4</td>
  69. <td>5</td>
  70. <td>6</td>
  71. <td>7</td>
  72. <td rowspan="5">tttttt </td>
  73. </tr>
  74.  
  75. <tr>
  76. <td>8</td>
  77. <td>9</td>
  78. <td>10</td>
  79. <td>11</td>
  80. <td>12</td>
  81. <td>13</td>
  82. <td>14</td>
  83. </tr>
  84.  
  85. <tr>
  86. <td>15</td>
  87. <td>16</td>
  88. <td>17</td>
  89. <td>18</td>
  90. <td>19</td>
  91. <td>20</td>
  92. <td>21</td>
  93.  
  94. </tr>
  95.  
  96. <tr>
  97. <td>22</td>
  98. <td>23</td>
  99. <td><strong>24</strong><br/><strong>No evening classes</strong></td>
  100. <td><strong>25</strong><br/>Christmas<br/>School closed</td>
  101. <td>26</td>
  102. <td>27</td>
  103. <td>28</td>
  104. </tr>
  105.  
  106. <tr>
  107. <td>29</td>
  108. <td>30</td>
  109. <td><strong>31<br/>No evening classes</strong></td>
  110. <td><br/><br/><br/><br/><br/><br/><em>1</em></td>
  111. <td><br/><br/><br/><br/><br/><br/><em>2</em></td>
  112. <td><br/><br/><br/><br/><br/><br/><em>3</em></td>
  113. <td><br/><br/><br/><br/><br/><br/><em>4</em></td>
  114. </tr>
  115.  
  116.  
  117. </tbody>
  118. <tfoot></tfoot>
  119. </table>
  120. </div>
  121. <div id="table" class="wrap">
  122.  
  123. </div>
  124. </div>
  125.  
  126. </body>
  127. </html>
Nov 4 '13 #1
0 1190

Sign in to post your reply or Sign up for a free account.

Similar topics

0
10820
by: Martin Ernst | last post by:
Hello, i have a table with two rows: <TABLE> <TR> <TD ROWSPAN="2"> <IMG SRC="pics/image.jpg" width="575" height="???"> </TD> </TR>
7
10426
by: John A. | last post by:
Hello all! I've got a big bunch of pages using tables for layout. Eventually I'll get them set up with more modernized code, but in the meantime I'd like to slip in a little quick holiday decoration. I'd like to insert a table cell with a fixed width (as much as such things can be fixed) and a repeating garland background so as to show up...
7
18895
by: Andrew Poulos | last post by:
I'm using the following code to create a small table with one column and two rows. An image goes into the first cell. //create table var t = document.createElement("TABLE"); t.style.position = "absolute"; t.style.left = "100px"; t.style.top = "100px"; t.style.width = "200px";
2
26112
by: Urbanposters | last post by:
Hi, i am hoping someone out there can help me with this, b/c i don't really know what is going on. i am working to put a background image in a cell of my table. i am using dreamweaver mx. the css code is as follows; .featured_cells { background-image:url(Images/Front_Page/featured_cells.gif); background: no-repeat bottom right;...
5
3435
by: Doug Laidlaw | last post by:
HTML validators say that "background" is not a valid attribute for a <td> tag I want to set an image as the background for one cell only, and to have the cell content on top of it. If I can't use <td background="img src=.."></td>, what is the correct method? Some modern templates do it all with CSS, but that is getting a bit too deep for...
2
12213
by: Manny Chohan | last post by:
i am trying to add image to table cell. Here is my code.. System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image(); img.ImageUrl="http://localhost/Lhw/Images/i.p.new.gif"; for(int i=0; i < allRecords.Length; i++) { TableRow tRow = new TableRow(); Table2.Rows.Add(tRow); TableCell tCell1= new TableCell();...
2
3799
by: Jim | last post by:
How can I use JavaScript to change a background image in a table cell? Here's the code for the cell <td width="338" valign="top" background="../images/ LEC_Q1.jpg"><div align="right"></div></td> You can see that the background is set to the image LEC_Q1.jpg. I want to change the image LEC_Q1.jpg to LEC_Q1_faded.jpg after a user clicks...
2
1776
by: AAaron123 | last post by:
I have an image inside a table cell. I'd like to scale the image to fill the cell. I have a javascript routine that can change the image's height but can't seem to fine a place to call it with the cell dimensions not equal to zero. Got any ideas where?
22
60756
Atli
by: Atli | last post by:
Hi. I'm setting up a small photo-album-type thing, where I use PHP to set up a list of images for visitors to click through. That's all simple enough. However, I'm having a weird bug in IE8. Because the images can all be of different sizes (nothing I can do about that... outside my control), I use a CSS trick to get them all centered...
2
2921
by: NewtoHTML5 | last post by:
I'm converting a circa 2002 website to comply with html5/CSS3, without rewriting it extensively. I'm not familiar with the nuances of HTML5 in terms of rendering, and I can't find this particular issue in the references. The validation errors consist of no longer used attributes, so I'm thinking to upgrade the .css file to replace them, and...
0
7666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7644
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2083
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.