XHTMLboy Posted March 20, 2013 Share Posted March 20, 2013 Hey people, basically I want to add a border when hoverd over. I have done it, it's just that my input boxes move when I have over them and I don't know why, any help will be appreciated. :-) www.brightonvinyl.com/v4/sign_in.php It's basically the sign in form and the Date of birth field. Thanks for looking guys. :-) Link to comment Share on other sites More sharing options...
Labtec Posted March 20, 2013 Share Posted March 20, 2013 If you take margin: -1px; out of this it should work: .hover_select:hover { border: 1px solid #C40000; margin: -1px;} Hope this helps. Kind regards, Lab. Link to comment Share on other sites More sharing options...
XHTMLboy Posted March 21, 2013 Author Share Posted March 21, 2013 For some reason when I remove the margin: -1px; it still movies. Any thurther things I could try? Thanks :-) Link to comment Share on other sites More sharing options...
jeffman Posted March 21, 2013 Share Posted March 21, 2013 The problem is that you're going from margin-top: 15px to margin: -1px. You're experiencing a 16px movement. So don't use the margin trick for this. You already have the right idea by giving .hover_select a transparent border. What you haven't done is given the border a dimension. So in effect it doesn't have a border until the :hover. So simply give the transparent border a 1px width. In the :hover state, change only the border's color. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now