|
Posted by Toby A Inkster on 04/20/07 09:43
russell.allbritain wrote:
> I am developing a custom content management solution for a client. I
> was wondering if there was a way to allow them to maintain a style
> sheet that would only affect only a certain DIV.
Not in current versions of HTML. WHATWG HTML 5 offers this facility, and
parts of HTML 5 (IIRC, not this part yet though) are being currently
implemented in newer versions of Safari, Firefox and Opera.
If you allow them to write their own style sheet, you could try having
your CMS parse that style sheet and adjust the selectors so that they only
apply to that DIV. For example, if they input the following style sheet:
body { color: orange; }
p { margin: 1em 0 2em; }
h1, h2, h3 { color: green; }
Your CMS could transform it to:
#somediv { color: orange; }
#somediv p { margin: 1em 0 2em; }
#somediv h1, #somediv h2, #somediv h3 { color: green; }
I'm not going to pretend that it would be easy; but it wouldn't be
impossible.
--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
Navigation:
[Reply to this message]
|