Input field with ruled lines beneath each line of text

Can you assist in creating a textarea that displays lines under each row of text similar to the example shown in the image below?

Answer №1

Check out this customized code I made for you on jsfiddle, does it meet your requirements?

<style>
._ta { 
    background-color:#AADDF2;
    padding:10px;
}
._ta textarea { 
    background: transparent url(http://s24.postimg.org/62v2ipx81/underline.png) repeat; 
    border:none;
    height:150px;
    width:300px;
    overflow:hidden;
    line-height:30px;
    font-weight:bold;
    color:#FF9900}
</style>

<div class="_ta">
        Reasons why I love my name:<br />
<textarea></textarea>
</div>

See the demo here: http://jsfiddle.net/TV47t/1/

Answer №2

To accomplish your desired outcome, consider utilizing background-image or exploring CSS gradients.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Having trouble with the Bootstrap 5 Modal? Discover how to ensure smooth functionality

How can I configure a Bootstrap 5 Modal to open only after clicking on a specific Navbar Dropdown item, without causing the whole website to be disabled and ensuring that all close buttons function correctly? <!doctype html> <html lang="en"> ...

The functionality of the click event does not function properly for buttons that are dynamically generated using

Upon selecting the "Keyboard layout" option, JavaScript generates buttons dynamically. However, the click event does not work with these dynamically generated buttons. This issue is likely due to the fact that the element ".prices-tier" does not exist when ...

Access Azure-Active Directory through cypress tests

Currently, I'm faced with the task of creating automated tests for an application that requires login to Azure Active Directory. These tests are being written using Cypress and TypeScript. In search of a solution, I am seeking advice on how to execute ...

Mastering the Effect of .fadeIn() in Combination with .after() Method

Could you help me understand why the .fadeIn() function is not working properly in this code? My goal is to combine the .after() and .fadeIn() functions together. $("input").blur(function(){ $(this).after('<div class="err">There is an Error&l ...

Angular RxJS: Trigger an action upon subscribing to or unsubscribing from an observable

I'm in the process of converting some Javascript events into Observables using RxJS within an Angular application built on the Ionic framework. My goal is to begin listening for events when the "client" invokes .subscribe(), and then stop listening wh ...

Make a reference to a specific element within an Angular component and access

There are two images to choose from, and based on your selection using ng-click, the class changes. When moving on to the next step, a new object is created to store references to the selected image: $scope.cabinetDetails.cabinetType = { name: $scope. ...

Issue encountered while trying to utilize the reset function of the FormGroup with the angular2-tinymce plugin

I utilized the FormGroup feature to construct my form, and I required a textarea component. I decided to use the angular2-tinymce library/package to create the form. Here is my HTML template: <form (submit)="submitCallLog($event)" [formGroup]="callLo ...

Arrange a series by the actual pixel width of the string

Imagine you have an array of tags represented as strings and you need to display them in a narrow view. Some tags are smaller, allowing for 2 to fit on one line, while larger tags require their own line. Your goal is to sort the array so that the smalles ...

Ways to modify the appearance of an element using a targeted CSS class

I am attempting to customize the font-family of a specific element on a website (https://chromewebstore.google.com/) with my own custom font. To achieve this, I created a Chrome extension locally. However, the element I want to modify does not have an "id" ...

Manage user interface elements on mobile devices

When viewing my label and two textbox controls on a desktop, they are aligned horizontally. However, I want these textboxes to stack on top of each other when the user views the site on mobile. I am using a media query to adjust to a mobile view, and all o ...

Passing an object in an ajax call to a function: a comprehensive guide

@model IEnumerable<HitecPoint.BlackBox.Models.SMSReportModal> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"> </script> <script type="text/javascript"> var MyAppUrlSettin ...

Error encountered in Vue: Unexpected token (x:y) when utilizing webpack-dev-server with a process.env variable

While constructing a Vue (2.7.14) component with webpack-dev-server, I encountered a need to make a URL dynamic in my Vue CLI 2 code using a process.env variable. In order to achieve this, I made a modification to the line of code in MyComponent.vue: ...

Utilizing external libraries in Vue 3 CLI projects

I've been attempting to load modules like Jquery and @tensorflow/tfjs, but I'm having trouble getting them to work. Both have been installed using npm. Everything in my @vue3/cli project works perfectly until I try to import these two modules. ...

Steps for including an animation class in a div

Is it possible to add the sweep to top blue color animation to the red box using a set-timeout function instead of hover? I tried using the following code but it doesn't seem to be working. Can you help me troubleshoot? setTimeout(function() { $( ...

Calculate the previous date excluding Sundays by subtracting the specified number of days from the given date

I'm experiencing an issue with this Date : 09/30/2014 NumOfDays : 5 Expected PreComputed Date : 09/24/2014 ---------------------------- 09/29/2014 Day 1 09/28/2014(Sunday) Skip 09/27/2014 Day 2 09/26/2014 Day 3 09 ...

Does Three.js have a concept similar to an origin point?

I am curious to know if there is a concept similar to an origin point in three.js like we have in Blender. I have been researching this topic without any luck. I am working on creating a pinball game and it is crucial that the origin point of the paddle ...

Guide to modifying component properties in Storybook

Currently, I am experimenting with storybook (here) to test my components in isolation. My goal is to simulate the entire flux cycle (typically handled using redux in the full app) and modify a property by utilizing a simple object within the story. Howeve ...

Evaluating h1 content in HTML using Angular Protactor testing

I am completely new to end-to-end testing. I have a login page in my application that should be displayed to users when they log out. However, I am facing an issue with retrieving the text from a specific div element containing an h1 tag, leading to unexpe ...

New ASP .NET MVC 5 Web application in Visual Studio 2013 with .NET and JavaScript Error Handling

I recently installed Visual Studio 2013 Ultimate with Update 1, but I'm encountering numerous exceptions when running a new Web Application. Despite my efforts, the output displays errors that seem to be unrelated to any mistakes on my part. Błąd c ...

What is the best way to access a specific attribute of an HTML element?

Within my ng-repeat loop, I have set a custom attribute like this: <div ng-repeat="item in itemsList" stepType="{{item.stepType}}"> {{item.itemValue}} </div> The possible values for item.stepType are 'task' or 'action ...