Hello, just recently found this site. It’s neat!
So, I have an annoying problem:
My lists add unwanted spacing in between the lines. I think it wants to ‘equal it out’ – Whatever it is, I want to get rid of it.
Orange is the background color for the
The HTML (look at source, I don’t know how to make it appear as code, it automatically formats):
The Problem ( picture):
See the annoying space? Tried some things such as making the
It’s on wordpress in the text edit tab for the page, in case that makes a difference.
Not quite, it doesn’t work with my line items and still divides it in a strange way. I actually figured out now how to link to the original code I had, it’s here:
I think it might have something to do with the ‘strong’ tags?
@Gingerbread, [Here’s a pen](http://codepen.io/wolfcry911/full/mqtiL “”) showing different techniques. In each case I used the dimensions you gave above. The font-size used is going to vary depending on the font you specify (I left default san-serif).
The first is just a replica of your image. The reason for the spaces is that a float will not render higher than a previous float – so the long list items are creating the spaces.
The second shows two lists with an equal number of list items. But because the li are of different length, you’ll wind up with different length lists. This assumes that the lists are dynamic – if you’re hard coding them, you could alter the number of items each list has.
The third is a simple single full width list – might be the best option. It would need a slightly smaller font-size to fit everything however.
Note that in the future, or now if you want to use browser prefixes, you could use css columns to achieve your orginal desired look. The fourth example shows this (with prefixes)
You must be logged in to reply to this topic.