Solved

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

Posted on 2006-11-14
5
211 Views
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
 http://www.mariafalconer.co.uk/index.html

cheers
Maria
0
Comment
Question by:abraxar
[X]
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
  • 3
  • 2
5 Comments
 
LVL 30

Expert Comment

by:Steggs
ID: 17941635
Greetings Maria,

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

Regards
0
 

Author Comment

by:abraxar
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!
Maria
0
 
LVL 30

Expert Comment

by:Steggs
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
<head>
<style type="text/css">
#myTable {
background-color:#336699
}
</style>
</head>
<body>
<table id="myTable">etc</table>
</body>

or in your stylesheet

#myTable {
background-color:#336699
}

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
Mark
0
 
LVL 30

Accepted Solution

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

 {
background-color:#336699;
}                                        ^     always close with ;  
0
 

Author Comment

by:abraxar
ID: 17946321
that's great- all done! Many thanks
Maria
0

Featured Post

To Patch or not to Patch? That is the question!

Don't get caught out like thousands of others around the world in the recent Ransomware Fiasco!
Discuss..
- Why it's not a good idea to wait before Patching
- Sensible approaches to Patching discussed
- Add your feedback, comments and suggestions

Question has a verified solution.

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

I recently found myself in a Corporate Situation where the client had requested blocking access to any and all websites except his own Domain? Easy? I am sure this would be your answer but their requirement was, this has to be done without using…
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…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
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 +…

738 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