Click to See Complete Forum and Search --> : stupid css problem to have... but i still have it.


stevesweetland
11-13-2006, 12:20 PM
its really annoying.

theres a page i have which declares all its css, and it interrupts with the css of a wysiwyg editor im trying to put in...

and messes it all up.

i wonder if its possible that i could - and i know how this sounds, i know, i know, im sorry to even ask it - disable css for a chunk of the page - ie. the bit that contains the wysiwyg editor... so it uses its own css...

rincewind456
11-27-2006, 04:47 PM
You can, that's the whole point of CSS, declare a diffent class name for your wysiwyg editor and write either a seperate style sheet and call that as well as the original or add the style rules to the existing sheet.

You could also add inline css style rules on individual elements with for example style="font-size:1.2em;"

bpat1434
11-28-2006, 12:07 AM
It's sloppy, but you could also have 3 includes for 2 different stylesheets.

1.) First include defines your entire site layout and such
2.) Second include is just before the WYSIWYG editor, and includes the WYSIWYG stylesheet
3.) Third one is after the WYSIWYG editor and is another inclusion of the original stylesheet.

Like I said, sloppy, but it should work.

Now, the proper way to fix this is to change your CSS so it doesn't interfere with the WYSIWYG editor. You can do this in one of two ways:

1.) Just flat out change your CSS declarations (case-sensitive. So input != Input != iNpuT)
2.) Wrap the WYSIWYG editor in a div (with no style) and change the WYSIWYG editor definitions so that they are only relevant to when it's inside that specific div:
<div id="wysiwyg_editor">
<!-- Your WYSIWYG editor controls -->
</div>
#wysiwyg_editor .common_class_name {
/* Declarations */
}

Now, you can limit even further by adding a ">" in between "wysiwyg_editor" and ".common". Play with it until you get it right if you do that.