html - CSS Nested not working the way i want it to! -


Well say I have it

   & Lt; TD & gt; & Lt; Table & gt; & Lt; TR & gt; & Lt; TD & gt; It should not be bold! & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt;  

And then we found some CSS for it

Table.infoBox tr td {font-weight: bold; }

Now my problem is that nested table CSS is also getting when I want to get this CSS only to the external table, how should I define it so that the nested table is not affected by CSS?

When you can do this with immediate child, it is not supported Try all browsers: / P>

  table.infoBox tr td {font-weight: bold; } Table.infoBox table tr td {font-weight: normal; }  

All selector table.infoBox tr td says:

This style can be used for any & lt; Td> Apply to tag that can be used for any and lt; Tr & gt; is a child of the tag, which is the child of any table containing the box of information box.

Therefore, you need to get more specific under this style block to declare what you want to do for the table inside the table of class InfoBox.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -