I am creating a menu bar where I need to show border on hover. but adding border is disturbed the layout.
How can add border without affecting layout.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have two choices.
Probably best is to add a border even when it’s not on hover, but set the color to
transparent(or to the background color). Then in the hover only change thebackground-color:, but not the size or existence of the border.Or you can use
outline:– but check browser support for it first.