Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's not a specific "how do I..." question. I have a lot of front-end experience and have always wondered why inputs present so many styling challenges. I'm aware there are some properties you can control, but, they're inconsistent, limited, and apparently arbitrary. For instance, try indenting the text of a select box option. That seems like it should be easy with CSS, but it's not. You have to manually (pre/ap)pend characters or go with a JS replacement approach. There are a lot of those little gotchas, and I'm curious if there are general reasons why that exist in a layer below what I'm used to working with.


That's a good question, but it maybe because at the root of it you have an object/class called check box and its attributes and methods are defined by object. These object are not rendered the same as formatting is by the browser.

So in your example that select box has a list method which doesn't have a property that supports indentation.

You'd have to write a new set of methods that extend the current form inputs. Depending on the browser I guess you could load as an extension or add-in.

Hope that helps.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: