treehouse : what would you like to learn today?
Web Design Web Development iOS Development

css textarea

  • Hi guys,
    i have placed a textarea in form of a popup. The problem is when i write inside the textarea the background image sprite of textarea also begin to scroll up on adding content. Anyone have the solution for this?


    <span class="common_wht round_wht empty_wht multi_wht">
    <textarea tabindex="6" style="width:245px;" cols="30" rows="5" id="mText" name="mText" class="uniform"><?php echo stripslashes($mText) ?></textarea>
    </span>

  • Put the background in the wrapper, make the textarea background color to be transparent:

    .common_wht {background:url('') no-repeat top left;}
    .common_wht textarea {background:transparent;}
  • Thanks for your suggestion @Hompimpa but i have kept left curve of background image in wrapper and the right curve image in textarea.

    span.empty_wht.multi_wht{background-position:left -1448px\9!important;margin-left:0px\9;}

    span.empty_wht.multi_wht textarea{background-position:right -1794px\0/!important;margin-right:-4px\9; background-attachment:fixed;}