I would like a div to look like this:
but would only like to use CSS, how would I co about creating a shape like this?
Do I create custom border for the top and bottom?
I would like a div to look like this:
but would only like to use CSS, how would I co about creating a shape like this?
Do I create custom border for the top and bottom?
If you want to only have the borders on the top and on the bottom of your image you can create this by using pseudo elements.
You can look at the code here, it does exactly what you want: http://codepen.io/orhanveli/pen/tbGJL
The code from the website:
HTML
CSS
You could use the
mask-box-image
property to do this.FIDDLE
See this html5 Rocks article on masking
CSS