I have form submit buttons that are styled with some css. At the moment I used only submit buttons on the site but for some pages it is better to just use a link. Now I'm trying to change that, but I'm not quitting getting the exact result that I'd like to have. They keep expanding (width:100%;) untill they reach the container, but the link gets out of the container and I dont know why.
Why is the link, not growing untill it reaches the container like the button? I'd prefer to keep using the same class for both the button as the link, but if that isn't possible I'll use different owns.
I've made a quick fiddle
Assume the divs are my container
<div>
<input type="submit" value="submitBtn" class="btn">
</div>
<div>
<a href="#" class="btn">link</a>
</div>
The css
.btn {
background-color:#EE3399;
border:3px solid #A10055;
display:inline-block;
color:#26328c;
font-family:Verdana;
font-size:20px;
font-weight:bold;
padding:6px 24px;
text-decoration:none;
cursor: pointer;
width: 100%;
text-align:center;
}
div{
width:750px;
background:green;
margin-bottom:1em;
}