Could someone help clarify the distinction between these two types of CSS declarations:
ul#test {
}
#test ul {
}
Despite my searching, I am unable to pinpoint the difference, but they exhibit different behaviors when implemented on a test page. To me, it seems that both declarations serve the same purpose, which is to link the #test ID exclusively with a UL element it is associated with. However, in practice, when using ul#test in my stylesheet, the styling works correctly. Conversely, if I use #test ul, it does not.
You can view what I'm referencing here:
http://jsbin.com/awixib/2/edit#source
Does ul#test imply that the ID is specifically assigned to a UL tag, while #test ul indicates that the UL resides within another element assigned the ID?