473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

Table color problems

Sorry, I'm new to BYTES.com and posted this first in the articles section....

When I display this HTML in a browser the colors do not work. This has to be something very elementary, but I am stumped. What am I doing wrong?

Expand|Select|Wrap|Line Numbers
  1. <table BORDER=3 WIDTH="500" >
  2. <tr>
  3. <td WIDTH="100" BGCOLOR="#FFCC00">
  4. <center><b><font face="Arial,Helvetica">Col A</font></b></center>
  5. </td>
  6.  
  7. <td WIDTH="150" BGCOLOR="#FFCC00">
  8. <center><b><font face="Arial,Helvetica">Col B</font></b></center>
  9. </td>
  10.  
  11. <td WIDTH="250" BGCOLOR="#FFCC00">
  12. <center><b><font face="Arial,Helvetica">Col C</font></b></center>
  13. </td>
  14. </tr>
  15. <tr><td BGCOLOR=”#FFCC00">Gold</td>
  16. <td BGCOLOR="#FFCC00">Gold</td>
  17. <td BGCOLOR="#FFCC00">Gold</td></tr>
  18. <tr><td BGCOLOR=”#33FF33">Green</td>
  19. <td BGCOLOR="#33FF33">Green</td>
  20. <td BGCOLOR="#33FF33">Green</td></tr></table>
Jan 19 '09 #1
4 2062
Nicodemas
164 Expert 100+
you had some "smart quotes" in your HTML, notice the slant on the quotes on the cells.

try this:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <table BORDER=3 WIDTH="500" >
  4. <tr>
  5. <td WIDTH="100" BGCOLOR="#FFCC00">
  6. <center><b><font face="Arial,Helvetica">Col A</font></b></center>
  7. </td>
  8. <td WIDTH="150" BGCOLOR="#FFCC00">
  9. <center><b><font face="Arial,Helvetica">Col B</font></b></center>
  10. </td>
  11. <td WIDTH="250" BGCOLOR="#FFCC00">
  12. <center><b><font face="Arial,Helvetica">Col C</font></b></center>
  13. </td>
  14. </tr>
  15. <tr><td BGCOLOR="#FFCC00">Gold</td>
  16. <td BGCOLOR="#FFCC00">Gold</td>
  17. <td BGCOLOR="#FFCC00">Gold</td></tr>
  18. <tr><td BGCOLOR="#33FF33">Green</td>
  19. <td BGCOLOR="#33FF33">Green</td>
  20. <td BGCOLOR="#33FF33">Green</td></tr></table> 
  21. </body>
  22. </html>
Jan 19 '09 #2
Dormilich
8,658 Expert Mod 8TB
you should have a look at CSS, this makes styling much easier (despite that the <font>, <center> and <b> tags are deprecated)
Jan 19 '09 #3
Bingo! Thank you very much.
Jan 19 '09 #4
Nicodemas
164 Expert 100+
I concur with Dormilich. Make the switch to CSS in the future.
Jun 17 '09 #5

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

Similar topics

61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
7
by: Richard Lawrence | last post by:
Hi, Consider the following: #Content { margin:0px 210px 50px 200px; padding:10px; } If I use it with the following HTML:
10
by: john T | last post by:
Is there anyway to vertically center a html table using css in such a way it does not alter the html table. When I tryied it just screws up.
3
by: Joachim Klassen | last post by:
Hi all, first apologies if this question looks the same as another one I recently posted - its a different thing but for the same szenario:-). We are having performance problems when...
11
by: Bobbak | last post by:
Hello All, I have these tables (lets call it ‘EmpCalls', ‘EmpOrders', and ‘Stats') that each contain the list of EmployeeIDs, I want to be able to create a Module in which I could call in my VB...
17
by: Jon Ole Hedne | last post by:
I have worked on this problem some hours now (read many-many...), and I can't solve it: In vba-code I create a table with Connection.Execute, and add some data to it. This table is saved in the...
3
by: Adriaan van Heerden | last post by:
hi, once again apologies if I'm covering old ground. I've looked through lots of previous posts and tried some code but nothing works as yet. However, the problem must be a very common one so...
4
by: deko | last post by:
I've heard it's best not to have any formatting specified for Table fields (except perhaps Currency), and instead set the formatting in the Form or Report. But what about Yes/No fields? When I...
1
by: Jim | last post by:
Hi, I want to add a field to a table in a database that is live and being accessed from the web. I'm using phpMyAdmin and when I try to add the field I get error #1142...
18
by: TORQUE | last post by:
Hi, Im wondering if anyone can help me with a problem. I have a form with more than 50 unbound fields. Some of the fields will be blank from time to time. This seems to be where im having...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.