Jump to content

Table head-body-foot color error..


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 post
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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...