Adding border to CSS triangle [duplicate]
One way to do it is the create an inner triangle which is smaller. Expand snippet
One way to do it is the create an inner triangle which is smaller. Expand snippet
The height of a block element defaults to the height of the block’s content. So, given something like this: #inner will grow to be tall enough to contain the paragraph and #outer will grow to be tall enough to contain #inner. When you specify the height or width as a percentage, that’s a percentage with … Read more
They are overlapping because you are floating a div, but aren’t clearing the float. Use the clearfix method to clear the float. Add a class container to your container divs and use this CSS: http://jsfiddle.net/57PQm/7/ You’ll also notice that I’ve removed your inline CSS. This makes your code easier to maintain.
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):
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/
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
I made a jsFiddle showing this effect: Edit: in response to your comment: Here’s a much sexier version.