I have a simple login form width username and password fields and submit button. Before I click the submit button the width of the input field is 212px as expected. When I click the submit button, the width changes to 200px.
Here is the css on the input:
.textInput {
padding: 6px;
width: 200px;
background-color: #15242A;
border: none;
color: #BFE6FE;
margin: 2px;
display: inline-block;
}
And here is the input:
<input type="text" class="textInput" name="username" value="<?php if (isset ($username)) echo stripcslashes($username); ?>"/>
It is not in any div or anything. All I want is for it to stay the same width before and after I submit the form
Here is a link to the full code http://jsfiddle.net/kEWdd/
Thanks for everyone who answered. I figured out the problem. I was echoing some js code in the php that was outside the html tag. Once I move the echo inside the head, the problem when away.