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?
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.
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.
<style type="text/css">.asd {
background: rgba(0, 0, 0, 0);
border: none;
}
</style>
<input type="text" class="asd" value="Label look like" disabled/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With