I need to create a solid color inset border. This is the bit of CSS I’m using:
border: 10px inset rgba(51,153,0,0.65);
Unfortunately that creates a 3D ridged border (ignore the squares and dark description box)
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 could use
box-shadow, possibly:This has the advantage that it will overlay the background-image of the
div, but it is, of course, blurred (as you’d expect from thebox-shadowproperty). To build up thedensityof the shadow you can add additional shadows of course:Edited because I realised that I’m an idiot, and forgot to offer the simplest solution first, which is using an otherwise-empty child element to apply the borders over the background:
Edited after @CoryDanielson’s comment, below: