isEditMode question

Permalink
I have an editable div on the page with z-index so it floats above the banner.

However, when I want to edit it I have to comment out the z-index and position in the css so I can then edit it then go back and uncomment.

How would I write the isEditMode code so it doesn't apply the z-index when editing?

thanks

trixiemay
 
PineCreativeLabs replied on at Permalink Best Answer Reply
PineCreativeLabs
You could do something like this:

<div <?php if ($c->isEditMode()) { ?>style="z-index: inherit;"<?php } ?>">
//code...
</div>


What's happening here is that - while in edit mode - the custom inline style is being added to the div tag that wraps your editable area. This is where you could specify z-index to "inherit". Or, you could use "auto" or the same value as the rest of the page. When it is NOT in edit mode, the inline style will not be added, so it returns to the original z-index position.

Hope that helps.
trixiemay replied on at Permalink Reply
trixiemay
Perfect. Thanks.