I think (?) I can keep reusing the same group of class names, but have them perform different styling for different ids by writing out a single stylesheet for various stories in this fashion:
.bg #story1 {background-color:#ccffff;} .bg #story2 {background-color:#ffffff;} .marginL #story1 {margin-left:30px;} .marginL #story2 {margin-left:20px;} .accentcolor #story1 {color:#ff00cc;} .accentcolor #story2 {color:#00ff66;} etc, etc, Or is it written the other way 'round, e.g.:
#story1 .bg {background-color:#ccffff;} ? But I think not, because a browser would only see the first mention of a given id and ignore the rest of the classes since a page is supposed to have only a single occurrence of a given id. Right?
Or would it be advantageous to label each loadable story div by class instead of id for some reason? If I use the above method, would a browser be able to refer to the correct 'version' of a given class if I wrote the html for a given story like this?
<div id="story1" class="marginL bg fontcolor">...</div> Only one story will ever appear at a time, each being loaded via jQuery into a receptacle division which is pre-stripped of all the page's styling classes except for class="container". Perhaps there's a more elegant way to assign styling to each story loaded without resorting to writing everything out as a string in .css(......) ?? Or should I first call .load of a dedicated stylesheet having jQuery write it in between style tags above the story content??
I've looked everywhere for more information on 'compound selectors' mixing ids with classes, but only find mention of elements combined with class names as for instance:
h1, h2, h3 .myStyle {font...color..etc}