Jump to content
Larry Ullman's Book Forums

Listbox Spacing

Recommended Posts

Hello All,


I have an app underdevelopment, that can be seen here.


I am posting with a question about the listbox that is seen in the column along the left side.


This box displays different spacing on different browsers.  On Firefox there is a large spacing between lines (about 1/8 inch gap between each line).  Very nice appearance.


However on Chrome, Safari and IE, there is almost no gap at all.  The result is the listbox looks very crowded.


I would like to check here with the forum if there is any options availble to adjust spacing, or if some possible hack would accomplish this result.



Very appreciative for any advice.





Link to comment
Share on other sites

You can try using a CSS reset to initialize the CSS for select elements and option elements across all browsers.

However, it should be noted that input elements (including select elements) are quite often very unique in appearance across browsers and impossible to make look exactly the same no matter what CSS properties you reset.


A common way to get around this is to do something like create an unordered list of a links instead of a select element with options. The downsides of this is that it's not nearly as semantic, and it relies on JavaScript being enabled to capture onclick events, etc. In other words, if JS is disabled, the thing won't work.


Over time, I've learned to just accept the fact that things can't (nor need to) look exactly the same across all browsers.

Just try to get it as close as possible within a reasonable amount of time and looking decent in all browsers.

I think that's the best you can do.


By the way, I remember some time ago seeing the Flash site you started with before, and I must say, your JS-only version is looking a lot nicer and smoother.

Good work!

Link to comment
Share on other sites

I know, Jon, but given how you phrased it, I wanted to clear that up. It's a natural next step to search for "CSS reset", and I wanted to clarify for anyone else reading the post moving on.


I actually think we discussed resets vs normalizing something like a year ago, and it was then I switched over myself. ;)

Link to comment
Share on other sites


  • Create New...