?
Solved

Borders around margin css

Posted on 2012-09-05
4
Medium Priority
?
468 Views
Last Modified: 2012-09-16
Hi

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

Thanks
0
Comment
Question by:coolispaul
  • 2
  • 2
4 Comments
 
LVL 22

Expert Comment

by:Kim Walker
ID: 38367463
Margins are outside the border. Padding is inside the border.
0
 

Author Comment

by:coolispaul
ID: 38367471
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
 
LVL 22

Accepted Solution

by:
Kim Walker earned 2000 total points
ID: 38367491
You would have to wrap it in another element with 20px padding that has the border.
0
 

Author Comment

by:coolispaul
ID: 38367495
ok yep that makes sense

thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question