If you modify the user-created CSS as you save it; adding descendant selectors to all their rules, you can limit the effect of their styles to an element of your choosing. If you take this HTML:
<html>
<body>
<div id="userEditableArea">
<h2>Stylable</h2>
<p>Users can style this section.</p>
</div>
<div id="footerBar">
Users can't style this section.
</div>
</body>
</html>
The user creates the following stylesheet, trying to hide your footer:
h2 {font-size:2em;}
p {font-color:#333;}
#footerBar {display:none;}
When the user saves their styles, you parse through and add #userEditableArea
to all of their rules, so they only work on elements inside <div id="userEditableArea">
. This should be pretty easy to accomplish with a regex pass or two.
#userEditableArea h2 {font-size:2em;}
#userEditableArea p {font-color:#333;}
#userEditableArea #footerBar {display:none;}
Anything you don't want them to mess with, put outside of #userEditableArea.
This should be pretty robust - more so than using !important rules or high-specificity selectors, and doesn't require any JS.