Jump to content

Table head-body-foot color error..


nosthertus

Recommended Posts

i have a color error about the tables. i dont know when it comes to put the color using the CSS text "tbody {color:blue;}", im setting it at the same order as the page has gives.. except for tfoot and tbody.. i switched their orders, but what im trying to figure out.. is why the tbody element affects the color of the whole script.. when its set.. the whole text of the html page changes to the element's color, in this case.. blue. i want to know why it happens.. how to fix this bug or error scripting... this is the example tag that the page gives.http://www.w3schools...s/tag_thead.asp and ill put the file of my scripting... i have all the tables examples in a single html file with my comments.. the comments are in spanish..

tablas.html

Link to comment
Share on other sites

It sounds like you are asking why the text in ALL the tables is blue. Anyway, that is what I see when I view the page. It happens because some browsers add a tbody element to your table even if your HTML does not include a tbody element. This can make some CSS and some JavaScripting unpredictable. One way to fix it is not to use the tbody element selector in your stylesheet, but to use class or ID selectors instead.

Link to comment
Share on other sites

It sounds like you are asking why the text in ALL the tables is blue. Anyway, that is what I see when I view the page. It happens because some browsers add a tbody element to your table even if your HTML does not include a tbody element. This can make some CSS and some JavaScripting unpredictable. One way to fix it is not to use the tbody element selector in your stylesheet, but to use class or ID selectors instead.
thanks for your answer.. ill avoid using the tbody then.. but as im still new at html, ill just not use tbody and thead, tfoot only
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...