The text within the label is spilling over the edges of the text area

The text on the label is overlapping with the text in the textarea. Please add some space between the label and textarea text to avoid this issue.

.group {
    position: relative;
    margin: 7.5px 0;
}

.group textarea {
    background: none;
    color: #000;
    font-weight: 400;
    font-size: 12px;
    padding: 25px 10px 10px 10px;
    display: block;
    width: 100%;
    border-radius: 4px;
    border: 1px solid #d0d0d0;
}

.group label {
    font-weight: normal;
    position: absolute;
    pointer-events: none;
    left: 10px;
    transition: 300ms ease all;
}

.smalltextinput {
    top: 5px !important;
    font-size: 10px !important;
    color: #d0d0d0 !important;
}
<div class="group">
<textarea oninput="this.style.height = &quot;&quot;;this.style.height = this.scrollHeight + &quot;px&quot;" id="information" name="information" class="form-control" cols="30" rows="10">dddd</textarea>
<span class="highlight"></span><span class="bar"></span>
<label class="smalltextinput"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">Here the pedagogical reflection must be formulated. </font><font style="vertical-align: inherit;">It may help to ask the following questions: 1. Why did x react like this, 2. What happened prior to the observed action and 3. How does x need to be met</font></font></label>
</div>

<div class="group">
<textarea oninput="this.style.height = &quot;&quot;;this.style.height = this.scrollHeight + &quot;px&quot;" id="information3" name="information3" class="form-control" cols="30" rows="10" spellcheck="false" style="height: 179px;"></textarea>
<span class="highlight"></span><span class="bar"></span>
<label class="no-input smalltextinput"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">Here the action must be formulated. </font><font style="vertical-align: inherit;">So how did you choose to trade and with what effect.</font></font></label>
</div>

Link to Image

Answer №1

To adjust the spacing above the text area, consider increasing the padding-top.

.group {
    position: relative;
    margin: 7.5px 0;
}

.group textarea {
    background: none;
    color: #000;
    font-weight: 400;
    font-size: 12px;
    padding: 25px 10px 10px 10px;
    display: block;
    width: 100%;
    border-radius: 4px;
    border: 1px solid #d0d0d0;
    padding-top: 40px;
}

.group label {
    font-weight: normal;
    position: absolute;
    pointer-events: none;
    left: 10px;
    transition: 300ms ease all;
}

.smalltextinput {
    top: 5px !important;
    font-size: 10px !important;
    color: #d0d0d0 !important;
}
<div class="group">
                    <textarea oninput="this.style.height = &quot;&quot;;this.style.height = this.scrollHeight + &quot;px&quot;" id="information" name="information" class="form-control" cols="30" rows="10">dddd</textarea>
                    <span class="highlight"></span><span class="bar"></span>
                    <label class="smalltextinput"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">Here the pedagogical reflection must be formulated. </font><font style="vertical-align: inherit;">It may help to ask the following questions: 1. Why did x react like this, 2. What happened prior to the observed action and 3. How does x need to be met</font></font></label>

                </div>

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

Encountering the error message "require is not defined" while running tests in AngularJS with Karma

I have implemented AngularJS with Browserify for my app development. To conduct testing, I have decided to utilize Karma. The configuration file I have set up is as follows: module.exports = function(config) { config.set({ basePath: '', ...

Creating a mesmerizing parallax effect for your image: A step-by-step guide

Looking for help to create a parallax effect on an image when hovered over. Does anyone have any advice or resources? Feeling frustrated at the moment. Here is an example link for reference: http://codecanyon.net/item/jquery-moving-perspective/full_scre ...

Troubleshooting: ng-disabled not function properly in Angular.js

My goal is to only allow the button to be enabled if there is text in the textfield, but for some reason I am unable to make ng-disabled work: <form novalidate> <button type="submit" ng-click="add('+')" ng-disabled="bittext.$invalid ...

Attempting to integrate Bootstrap calendar onto my website, unfortunately receiving an Uncaught Error

I keep encountering this specific error: "Uncaught Error: Calendar: Events load URL is not set". Even though I am meticulously following the guidelines at https://github.com/Serhioromano/bootstrap-calendar, the calendar fails to display. All I ...

Embed the contents from a URL within an HTML document

I am currently in the process of developing an application using Node.JS and Express v4. My chosen template engine is Nunjucks. One of the routes I have set up for my app is the (widget) route, which is being rendered through Express with this code: app.g ...

The SQL statement functions correctly in the MYSQL command line but encounters issues when executed within a NODE.JS application

When running the following SQL as the root user, everything works fine: sudo mysql -u root -p DROP DATABASE IF EXISTS bugtracker; CREATE DATABASE bugtracker; USE bugtracker; However, when executing the node.js code, an error is encountered: Error: There ...

Implement drop-shadow filtering specifically for Internet Explorer

I am currently implementing a drop-shadow filter on a curved png, and while it works perfectly in most browsers, IE seems to be the exception. You can see the issue with the boxes on this page: (Three boxes located just below 'Yoga Sequence Builder ...

The functionality of Jquery and JS lies in working on DOM elements as opposed to

Just to start off, I want to mention that my knowledge of JavaScript and specifically jQuery is quite limited. I've encountered an issue with some JavaScript and jQuery loading on my webpage. 1) I have written some code on JSFiddle http://jsfiddle.n ...

What's the issue with HTML Table column width when using fixed-layout and 100% width?

Why does the table ignore column width and make them all even when using fixed-layout with a 100% width setting? Here is how the table looks without the 100% width: https://i.sstatic.net/MNrjZ.png However, setting the table width to 100% causes all colu ...

How can you prevent a tag from firing in Google Tag Manager by identifying a particular script included in the HTML code

Seeking advice on modifying our Google Tag Manager container as I am a novice when it comes to GTM. Encountering an issue with IE8 on pages utilizing Fusion Charts resulting in a javascript error in gtm.js. Upon investigation, it appears to be related to a ...

Tips for efficiently transmitting extensive strings over AJAX from JavaScript to PHP

I'm working on creating a system where users can write lengthy posts, but I'm facing an issue with transferring long strings through AJAX. I keep getting an error message saying the link is too large. To work around this, I started dividing the s ...

What are the distinct components used in CSS for :target?

I've encountered an issue with nesting :target pseudoclasses. Currently, I have a section containing an anchor tag. Right now, everything is functioning as intended; when I click on the anchor linking to #Current, it expands the area and displays the ...

Refresh the div by clearing it and filling it with new content after the change

Utilizing a jQuery UI Datepicker for updating resort availability based on the chosen date from an external JSON file. The issue arises when selecting a new date, as the previous results persist on the page. Is there a method to clear and refill the div wi ...

When attempting an express test with JEST and ESM, I encountered an error stating "TypeError: Cannot assign to read only property 'sum' of object '[object Module]'"

I recently attempted to use Jest for mocking imported functions, but encountered the following errors: TypeError: Assignment to constant variable. or TypeError: Cannot assign to read only property 'sum' of object '[object Module]'. I wa ...

Trigger the component method in vue.js upon loading

Hello, I am still learning Vue.js and I am facing a challenge that seems simple but I am struggling to solve it. My goal is to make one of the component's methods execute every time it is loaded into the DOM. I have tried using v-on:load but it doesn& ...

One way to eliminate a prefix from a downloaded file path is by trimming the URL. For example, if you have a URL like "http://localhost

As my web app runs on port number, I am looking to download some files in a specific section. However, the download file path is being prefixed with "". <a href={file_path} download={file_name}> <Button variant={"link"}> <b>Dow ...

Can sound be triggered from a JS file within Django's HTML template without using Ajax?

I'm currently in the process of transitioning a website to utilize the Django framework. Most of the JS scripts are functioning properly, except for those that involve sound. Specifically, I have a play/pause button for a song and some sounds that sh ...

Replace the current CSS styles of a pre-installed package

I recently added a package for a type writer effect, but I'm having trouble with it not overriding the CSS styles I've set in the component. Here's an example of what I have: <template> <v-row class="hero" align-content= ...

Flickering transition effect with CSS transformY on window scroll

I'm currently working on a react project where I want the navigation to hide when scrolling down and show when scrolling up. To achieve this, I've implemented a window event listener for scroll which triggers my toggleNavigation function, along w ...

Tips for adjusting the height of a cell or row in a wijmo grid using a dynamically assigned id

I've been attempting to increase the row height of a wijmo grid with no success. Despite consulting the official documentation which suggests adding padding to the css of the grid cells, I'm facing an issue because the id is dynamic and not fixed ...