Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6529669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:39:47+00:00 2026-05-25T09:39:47+00:00

I’ve created a nice set of form elements in Photoshop and am looking to

  • 0

I’ve created a nice set of form elements in Photoshop and am looking to convert them into HTML and CSS. The simple input-text form will have a background image, as the field does not change in size. However, the text-area form will dynamically change size as the user types.

Normally, to build out this sort of style, I’d wrap the form field in divs, as such:

<div class = "textarea-top">
  <div class = "textarea-bottom">
    <textarea></textarea>
  </div>
</div>

Or by using multiple background-images in one wrapping div:

<div class = "textarea">
  <textarea></textarea>
</div>

Is there a better way to approach this? To restate, the field styles are advanced images that can be repeated (for the body of the field), and have styling for the top and bottom. The question is, what is the best practice in dealing with these advanced form styling?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:39:48+00:00Added an answer on May 25, 2026 at 9:39 am

    I’m not entirely sure what you mean by “best practice”, but one thing I’d improve are the semantics.
    You could (should?) use <fieldset>‘s instead of a, rather meaningless, <div>.

    And you don’t need to use two <div>‘s around the textarea, or even multiple background images on a single <div> (which is a CSS3 property, and not widely-supported).

    Instead, you should wrap the <textarea> in a <label> element, and nest your background-images as I’ve described below:

    Try this:

    <fieldset class="expandableInput">
      <label>
        Semantic text:
        <textarea></textarea>
      </label>
    </fieldset>
    

    Bonus: wrapping form elements in <label>‘s like this, affords a larger click area, for the user to gain focus on the form element at hand. Just be wary of <select>‘s, which doesn’t play nice (even though it’s valid HTML)

    The CSS would be something like:

    .expandableInput {background: url(/path/to/first/img);}
      .expandableInput label {display: block; background: url(/path/to/second/img);}
        .expandableInput textarea {display: block; margin-top: 3px; background: url(/path/to/third/img);}
    

    Also;
    For consistent looks on form elements, in every browser & platform, I can highly recommend Nathan Smith’s Formalize CSS (it requires JS for HTML5 support in older browsers).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.