Inserting basic divs

  •  03-20-2010, 3:17 AM

    Inserting basic divs

    Sorry if this is a basic question, but I can't seem to find any info on this in the documentation...

    My client would like to be able to add highlighted boxes to their page content, which would typically be achieved with a styled div -- is there a way to allow them to insert a pre-styled div by clicking a button / selecting a value from a dropdown?

    The nearest I can find is the 'insert layer' button, but this inserts an absolutely positioned div (not what we want, as we want the div to flow with the page content); and the CSS styling dropdowns, but these seem to apply styles by means of span tags rather than div tags, so setting box properties this way wouldn't work either.

    I have been able to achieve the effect I wanted by redefining h1, h2 etc to contain box properties such as border, background colours etc, but using this method means that I'm restricted to six styles (for h1-6), and more importantly the layout gets broken in most browsers when the user nests a h3, for instance, inside an h4 -- so I need a better solution.
    There's probably a really easy way to do this, since it's such a basic requirement -- but I can't find what it is!

    Any help appreciated.
    Many thanks

View Complete Thread