Reputation: 53
I am working on a site developed in ASP.net already.
I was changing the .master file for the website and decided that an upgrade to HTML 5 was required.
So I removed the default xmls
tag from the HTML tag in the .master file and this had no visible effect on the site. But as soon as I change the DOCTYPE
to the format for HTML 5 all the tables in my site default to the user agent style sheet font size.
So in my .css file I added the following codes:
table > tr{
font-size:8px;
}
table > tr > td, table > tr > th{
font-size:8px;
}
body{
font-size:8px;
}
As far as my knowledge goes this will overwrite ALL default style sheet values and replace them with the css values.
But instead (When using Google Chrome developer tools) I can see that the default agent style sheet value is preferred to the actual value.
Can anyone tell me how I can fix this or how this problem occurs?
Upvotes: 1
Views: 221
Reputation: 943585
Look at the DOM. The start and end tags for the tbody
element are optional, but the element is mandatory. table > tr
won't match anything because a table row can't be the child of a table, only a grandchild.
Upvotes: 1