My CSS rule for #sidebar has property list-style-type: none. I want to know why UL element doesn't want to inherit first property from #sidebar? I read on the net that list-style-type property is inherited so why it doesn't want to apply to UL then? My 3 list items still have bullet points. On other hand it applied red color for text which is second property in #sidebar.
I can fix it in many ways but could somebody explain me why it doesn't work with #sidebar and which from examples below is the best. I really want to understand CSS not just fix it without knowing why it didn't work in the first place.
ul { list-style-type: none; }
or
li { list-style-type: none; }
or
#sidebar ul { list-style-type: none; color:#F00; }
or
#sidebar li { list-style-type: none; color:#F00; }