views:

61

answers:

1

Hi,

I have an editable iframe and I want to insert two DIVs at the [b]top [/b]and [b]bottom [/b]part(as header/footer) of iframe body respectively. Now, the question is : how to insert a div [b]at the top of iframe body[/b] and fix it there? (Will insertFirst() work?)

Also, how to fix the footer div always [b]at the bottom of the iframe body[/b]? I tried make its position absolute and gave a margin top/bottom, but the problem comes when the body height of the iframe increases and footer DIV position does not change.

I want the same thing google docs does, i.e. fixing separate part for header/footer (though google docs page is not an iframe).

Any work around?

Regards, Swarnendu

+1  A: 

I assume by "fixed" you don't mean position: fixed but "not editable"?

I don't know of a native way to do that, the only thing I do know is CKEditor's protectedSource configuration setting. It allows to specify regular expressions; content matching those expressions cannot be removed by the user.

If you mean "fixed" as in "position", the position: fixed CSS property should work for you (Doesn't work in IE6 though).

Pekka