Skip to content
Advertisement

Not quite hexagon looking border with CSS

Basically I’m trying to get this layout in CSS. I’ve somewhat working modal but I’m finding it hard to get the white box behind the text that is responsive and works for all screen sizes.

enter image description here

JavaScript
JavaScript

Advertisement

Answer

I have made you an example below using clip path. I personally would look to use an svg, due to browser support. See https://caniuse.com/#search=clip%20path Enjoy and let me know if you have any questions 🙂 I also threw in a couple other css tricks which I have used many times over the years.

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement