Today I notice outline propery in CSS. However I don’t know why it is added to CSS? What for?
For me, margin, padding, border is enough.
Today I notice outline propery in CSS. However I don’t know why it is
Share
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.
outlinecreates a border outside the element’s area, not adding to its width and not influencing the surrounding layout. From the quirksmode.org page onoutline:That is a very useful feature indeed, because it allows e.g. highlighting an element on
hover/focusactions without disturbing the neighboring elements. The slight dotted outline around focused links in Firefox is done using theoutlineproperty.It’s not supported by IE < 8, though, so it’s only of limited everyday use.