Reputation: 11
So I have made all buttons first letter uppercase and all other lowercase. But I don't know how to make it happen with input value. Why i want this is because if someone/I change value to lowercase it still be how it should be. I try to be more clear It is contact page submit button
<input type="submit" name="commit" value="send">
I don't know why but in jsfiddle this code below works fine but not in my code where it is all capitalized . I'm using less btw.
input[type=submit] {
text-transform: capitalize;
}
Upvotes: 1
Views: 1815
Reputation: 1
There is no such possibility to use pseudo element like first-letter, first-line or first-child for inputs. For buttons we can use <button type="submit">Submit</button>
instead of <input type="submit" value="submit"/>
to use the pseudo elements.
Upvotes: 0
Reputation: 1308
try this
.capitalize {
text-transform: capitalize;
}
.uppercase {
text-transform: uppercase;
}
.lowercase {
text-transform: lowercase;
}
<input type="Submit" value="Submit" class="uppercase" />
Upvotes: 0
Reputation: 542
<input type="submit" name="commit" value="send" style="text-transform: capitalize;">
apply style:style="text-transform: capitalize;"
Upvotes: -1
Reputation: 74
Would text-transform: capitalize; help?
input{
text-transform: capitalize;
}
Upvotes: -1
Reputation: 2854
Use text-transform: capitalize;
for input[type=submit]
.
input[type=submit] {
text-transform: capitalize;
}
<input type="submit" name="commit" value="send">
Upvotes: 6