Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

bgcolor not working for a table in Netscape and Firefox but ok in IE and Safari -

Posted on 2006-11-14
Last Modified: 2012-06-22
Hi there
not sure if this is an HTML issue or CSS but some browsers are showing the bgcolor and others not

Question by:abraxar
  • 3
  • 2
LVL 30

Expert Comment

ID: 17941635
Greetings Maria,

My first guess is that it is because bgcolor is deprecated... you should be using background-color


Author Comment

ID: 17941845
thanks that sounds good, I've had a quick look but am not sure of the best way to use that for a table and on some of the pages just for a table row. If I use the stylesheet to define the table then all the tables will change color, but I only want one to change.
sorry if my questions are very basic!
LVL 30

Expert Comment

ID: 17942366
You need to use style,

either inline
<table style="background-color:#336699"> or in your row <tr style="background-color:#336699">

or in the <head> of each page
<style type="text/css">
#myTable {
<table id="myTable">etc</table>

or in your stylesheet

#myTable {

where you give id="myTable" to the table in question. You can use the same method for a row or any element on the page. ID's are unique though. If you want to target more than one tag on the same page, you should use class. <table class="myTable"> and .myTable {style} in the stylesheet or head.

Hope this helps
LVL 30

Accepted Solution

Steggs earned 125 total points
ID: 17942374
oops i forgot to close the styles:

}                                        ^     always close with ;  

Author Comment

ID: 17946321
that's great- all done! Many thanks

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Cookie issue 7 141
Sudden performance loss on a Vista system. 14 153
Internet Explorer Certificate error 9 40
remove all history 3 36
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Several part series to implement Internet Explorer 11 Enterprise Mode
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question