Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i toggle an input's style to look like a label

Ive got some input fields which i want to style to initially look like labels, and then via angular.js apply a style to them so they can be edited after button is pressed. I'm using bootstrap, is there a inbuilt class i can toggle on and off these inputs?

like image 986
Tim Avatar asked Aug 17 '13 07:08

Tim


People also ask

How do I style a label in HTML?

The style attribute specifies the style, i.e. look and feel, of the <label> element. A style contains any number of CSS property/value pairs, separated by semicolons (;). The style attribute overrides any other style that was defined in a <style> tag or an external CSS file.

How do you make a label on top of input?

The simplest way is to wrap your input element inside a related label tag and set input style to display:block . Bonus point earned: now you don't need to set the labels for attribute. Because every label target the nested input.


1 Answers

<style type="text/css">.asd {
  background: rgba(0, 0, 0, 0);
  border: none;
}

</style>
<input type="text" class="asd" value="Label look like" disabled/>
like image 51
Marcin Avatar answered Nov 08 '22 19:11

Marcin