I have I coul
pre and div elements that are children of #mydiv.
The only way to reference the id only once is to use it with the * selector:
#mydiv > * {
which will apply to all elements that are children of that div.
Depending on what styles you plan to apply this might be workable (I typically use this to zero-out margins, padding and border styles), but it's still probably best to do it the first way because it makes it easier to make exceptions/changes later down the road.