Reputation: 3587
I am looking for the value="submit" to show up in the middle of the button. I am not seeing any text, not sure why?
<button type="button" class="button btn_big_blue" value="Submit"></button>
.button{
display: block;
width: 137px;
height: 44px;
text-align:center;
line-height: 40px;
font-size: 18px;
font-weight: bold;
text-decoration: none;
color:#fff;
border:none;
cursor: pointer;
}
.button.btn_big_blue {
background: url(/img/btn_big_blue.png) no-repeat;
color: #fff;
}
Upvotes: 4
Views: 17902
Reputation: 1
For some reason on Atom, you need to include / after the Submit as such:
Whereas the same thing in codepen displays the Submit value without the slash as such:
<input type="Submit">
Upvotes: 0
Reputation: 678
when you use the button tag, you put the text you want to be in the button between the opening and closing tag.
<button>Submit</button>
the value="Submit"
is only for <input type="button"
>
Upvotes: 12
Reputation: 265161
value
is the value transmitted when submitting/sending the form.
you want to put your content between the button tags:
<button class="button …">Submit</button>
ps. the class button seems pretty useless, because you can style the button directly
Upvotes: 1
Reputation: 887305
The <button>
tag doesn't use the value
attribute.
You should either switch to an <input type="submit" value="..." />
or move the caption to the content of the tag.
Upvotes: 3