Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a bootstrap input field "transparent"

I'm trying to remove the border from a bootstrap input form-control. After setting border-color:white i'm getting this

enter image description here

How can i lose this top border ? I thought it might be a shadow property but ... nothing.

This is the markup

<div class="form-group">
  <input class="form-control transparent-input" type='text' name='name' placeholder="Field title..."  required>
</div>

bootstrap v3.1.1

EDIT :

None of the solution below is working. see this Fiddle

like image 462
haki Avatar asked Feb 21 '14 06:02

haki


4 Answers

with bootstrap class you can make it transparent ...just apply this class to your code .bg-transparent

like image 186
Boniface Dennis Avatar answered Oct 26 '22 18:10

Boniface Dennis


Set background color using rgba() also add border:none; to remove the border

<style>
    input.transparent-input{
       background-color:rgba(0,0,0,0) !important;
       border:none !important;
    }
</style>

The last value 0 will make the background transparent

or simply set background color as transparent.

<style>
    input.transparent-input{
       background-color:transparent !important;
       border:none !important;
    }
</style>

add !important to override the existing style

like image 40
Pranav C Balan Avatar answered Oct 26 '22 20:10

Pranav C Balan


Change the background-color.

.transparent-input {
   background-color: rgba(0, 0, 0, 0);
   border:none;
}

You can change the background color to (0,0,0) and its opacity to '0'. Also use border:none. And try using !important to override the existing style if the above doesn't work.

like image 40
newTag Avatar answered Oct 26 '22 20:10

newTag


.transparent-input { background: tranparent; }
like image 31
A.M.N.Bandara Avatar answered Oct 26 '22 18:10

A.M.N.Bandara