Hexagon shape with CSS3
A simple search turned this up: CSS Hexagon Tutorial Referenced from the site: Put a 104px × 60px div with a background colour between them and you get (the hexagon):
A simple search turned this up: CSS Hexagon Tutorial Referenced from the site: Put a 104px × 60px div with a background colour between them and you get (the hexagon):
Your HTML: If you know the width of your image, your CSS: Otherwise your text below the image will free-flow. To prevent this, just set a width to your container.
You can use percent values: Not pixel perfect, but…
Not sure what HTML you’ve already got, but if the images are each wrapped inside a <div> or <li> then you can use display: table; and display: table-cell to ensure that no matter how many images, they’ll always fit the width correctly. Expand snippet Working demo here.
Expand snippet Like Eoin said, you need to put a non-breaking space into your “empty” spans, but you can’t assign a width to an inline element, only padding/margin so you’ll need to make it float so that you can give it a width. For a jsfiddle example, see http://jsfiddle.net/laurensrietveld/JZ2Lg/
jQuery is required (if you’re using Bootstrap 3 or 4) 😉 Expand snippet
You could use CSS. Setting display:block, or float:left on the images will let you have define your own spacing and format the HTML however you want but will affect the layout in ways that might or might not be appropriate. Otherwise you are dealing with inline content so the HTML formatting is important – as … Read more
You can use a skewed pseudo element to make the slanted solid background of your element. This way, the text won’t be affected by the transform property. The transform origin property allows the pseudo element to be skewed from the right bottom corner and the overflowwing parts are hidden with overflow:hidden;. The pseudo element is … Read more
you need to give width explicitly to header and footer Working fiddle If you want the middle section not to be hidden then give position: absolute;width: 100%; and set top and bottom properties (related to header and footer heights) to it and give parent element position: relative. (ofcourse, remove height: 700px;.) and to make it … Read more