Creating a dynamic text area in Twitter Bootstrap

I am interested in creating a Bootstrap Textarea with shadow effects using only pure css, but I am unsure of how to accomplish it.

Although I have some code, I seem to be at a standstill:

-webkit-border-radius: 0 4px 4px 0;
     -moz-border-radius: 0 4px 4px 0;
          border-radius: 0 4px 4px 0;

Could someone guide me on transforming it into a bootstrap text area?

Answer №1

To create a shadow effect for your textarea, you simply need to select the element and apply the box-shadow css property. The format of the syntax is as follows:

  box-shadow: horizontal-offset vertical-offset blur-radius spread-radius color inset;

In your particular scenario, include the following:

box-shadow: 0 0 4px rgba(0,0,0,0.7);

Answer №2

-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.2);

Fiddle

Implementing transitions as well.

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

I am looking to create a side menu that will allow for dynamic class changes upon clicking

I'm looking to create a dynamic side menu that changes class on click event. My goal is to have jQuery add a class to a clicked "li" element that doesn't already have the class "active", while removing the class from other "li" elements. I want ...

What is the best way to change the height of a div element as the user scrolls using JavaScript exclusively?

Coding with JavaScript var changeHeight = () => { let flag = 0; while(flag != 1) { size += 1; return size; } if(size == window.innerHeight/2){ flag == 1; } } var size = 5; document.body.style.height = &qu ...

I am encountering a challenge retrieving the ID via AJAX from the view to the controller. However, the ID is successfully displaying in the alert

In the view page code below, I am trying to send an ID through Ajax but it is not posting in the controller. The goal is to replace one question at a time fetching from the database. $(document).ready(function() { $("#next").click(function() { ...

Is it possible for a bootstrap carousel to rotate carousel items belonging to two separate carousel identifiers?

My Bootstrap 4 carousel setup is as follows: <div class="col-12"> <a class="carousel-control-prev text-dark" href="#myCarousel" role="button" data-slide="prev"> <span class=" ...

Why is the Jquery selected change not functioning on IE9?

Hey there, I've got this click function that's working smoothly on Chrome and Firefox but doesn't seem to do anything on IE9. Whenever I click the dropdown box, the click function doesn't execute on IE9. Here's the script: $(&ap ...

How to dynamically adjust the size of an HTML page using jQuery without displaying

Currently, I am working on resizing an HTML page vertically using jQuery. While I have successfully managed to resize the page, I encounter a problem where depending on the image used, I sometimes see vertical or horizontal bars even though the image fits ...

JQuery anonymous function fails to execute

Just starting to explore JQuery. I'm having an issue where the alert for '2' triggers, but never the alert for '1'. No matter how I rearrange the code, I always end up with the same outcome. JQuery is definitely loaded because at ...

What steps should I take to achieve this specific style for my WordPress website post?

Check out the image link here I'm looking to position the share and read more buttons at the bottom of the div, similar to "Sample Post 14". The trick seems to involve using excerpt or dummy text. Is there a way to achieve this styling with the skele ...

Need help with renaming a column in the column selector window within jqGrid?

In my two-column header Phase1 & Phase 2 (Image 1), I want to display the column names (Image 2) in the column chooser window. Name Category Subcategory Category Subcategory I would like the display to be: Name Ph1 Category Ph1 Subcategory Ph2 ...

Using setTimeout with jQuery to dynamically generate tables.Incorporating SetTimeout

Trying to implement a dynamic table using jQuery to display live data updates. Utilizing a setTimeout function to auto-refresh the content on the HTML page. $(document).ready(function update_data() { $.ajax({ dataType: "json", url: "/wire ...

What causes my CSS to be disrupted by a line break in one instance but not in another? (view demonstrations)

https://i.stack.imgur.com/bitod.png In comparing this particular fiddle with another version of the same fiddle, the only variance is that in the second one, there is </label><label for="address_zip" class="zip"> without a line break following ...

What is the reason behind my page being redirected by an alert?

What could be causing the page to redirect to its PHP script every time an alert is added to my AJAX form, but not redirect when the alert is removed? I want to prevent the page from redirecting to the PHP script. $(document).ready(function(){ ...

Navigation links can become stacked when the page is zoomed out

Currently working on a website using html and css. I have managed to create a navigation bar with links, but the issue arises when I zoom out - the links stack on top of each other rather than staying in line. Any guidance or tips would be greatly apprecia ...

Can you switch between displaying and concealing a dropdown in the same location based on chosen values?

I have four dropdowns listed, but I only want to display one at a time. Depending on the selected values, when I try to show a dropdown, it does not replace the current one; instead, it just appears next to the existing dropdown. Is there a way to keep th ...

Iterating through elements to set the width of a container

I am currently working on a function that dynamically adjusts the width of an element using JavaScript. Here is my JavaScript code: <script> $('.progress-fill span').each(function(){ var percent = $(this).html(); if(per ...

Tracking changes in real time and calculating the sum with AJAX, PHP, and MySQL for efficient processing

Initially, I kindly request you to read this until the end. I am in dire need of assistance with my problem as I have searched for solutions but still remain clueless. https://i.sstatic.net/DAb1q.png Referring to the image provided, the first 'Produ ...

When working with String.fromCharCode in jQuery, it often returns undefined

I am trying to use jQuery to convert Cyrillic input to Latin characters in my code. I am attempting to find the position of Cyrillic characters in an array and replace them with their corresponding Latin characters, but I keep getting an 'undefined&ap ...

Menu with a slider featuring three different choices

I am currently working on creating a box with a title and two arrows positioned to the left and right of the title. The goal is for the box to fade out when either arrow is clicked, and then fade in with the next option. I have a similar setup already impl ...

Excellent ASP .NET Editor

I'm facing an issue with adding a rich text editor to my app. Even after trying different editors like tinyMC or CK Editor, I am unable to make it work. Below is the code snippet for reference: <%@ Page Title="" Language="C#" MasterPageFile="~/Vie ...

Why is the footer appearing in the sidebar section?

I have a question that I believe may be common and already answered, but I can't seem to find the solution. codepen Currently, I am working on creating a simple 2 column layout. While the columns are displaying correctly, the footer ends up in the s ...