Nested div styles
Posted: Fri Jun 20, 2008 3:20 pm
I'm trying to convert an existing site to be a CMS template.
Each of the headings in the existing site is done like this:
Heading text
But, as far as I can see, editors using WYSIWYG can only assign one wrapping div to a line of text in the editor.
My current workaround is to assign the content block to a variable at the top of the template and execute some php with a regexp replace to add in the extra div where it's required. But the editors don't get an accurate WYSIWYG presentation, plus this seems a little heavyweight. Is there another way to do this?
- Dave
PS. Why two divs? The outer one puts a boundary the full width of the container, and the inner one puts a coloured and bordered box around just the heading text.
Each of the headings in the existing site is done like this:
Heading text
But, as far as I can see, editors using WYSIWYG can only assign one wrapping div to a line of text in the editor.
My current workaround is to assign the content block to a variable at the top of the template and execute some php with a regexp replace to add in the extra div where it's required. But the editors don't get an accurate WYSIWYG presentation, plus this seems a little heavyweight. Is there another way to do this?
- Dave
PS. Why two divs? The outer one puts a boundary the full width of the container, and the inner one puts a coloured and bordered box around just the heading text.