Borders around margin css

Hi

Is it possible to show a border around a margin in CSS?

Thanks
coolispaulAsked:
Who is Participating?
 
Kim WalkerWeb Programmer/TechnicianCommented:
You would have to wrap it in another element with 20px padding that has the border.
0
 
Kim WalkerWeb Programmer/TechnicianCommented:
Margins are outside the border. Padding is inside the border.
0
 
coolispaulAuthor Commented:
yeah, so is it impossible?

i want an element with a background color to also have a border but with 20px spacing first

Thanks
0
 
coolispaulAuthor Commented:
ok yep that makes sense

thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.