[pmwiki-users] preventing horizontal stretch of edit box

Hans design at flutesong.net
Mon Feb 14 13:52:06 CST 2005


Hi,

Using IE6 the textedit box stretches horizontally
when the first character is typed. Call it an IE bug if you like.
It annoyed me enough to figure out a solution which prevents this
behaviour alltogether, and makes it unnecessary to set the width of
the textarea to 98%:

The textarea tag needs to be hold in a container division, and some
styling applied. I called it tbox:

<div id='tbox'><textarea id='text' name='text' rows='25' cols='80'
    onkeydown='if (event.keyCode==27) event.returnValue=false;'
    >\$EditText</textarea></div><br />

The following style definitions need to be added:

  #tbox { position: relative;
          padding:0;
          margin-top:0.5em;
          }
  * html #wikiedit #tbox { height: 1%; margin-left:0.5em; }
  #wikiedit textarea {
            margin:0;
            padding:0;
            position: relative;
            width: 100%;
            }
this could be added to the skin stylesheet or by using

   $HTMLStylesFmt[] = "  ...put here style definitions..  \n";

I added this to http://www.pmwiki.org/wiki/Cookbook/LayoutEditModified
   

Best,
 Hans                          




More information about the pmwiki-users mailing list