Without seeing the other CSS that might be involved, the likely answer is CSS specificity.
There are many guides to CSS specificity out there such as this one, but the general math for CSS specificity is:
element selectors such as div = 1
class selectors such as .edit-input = 10
id selectors such as #title = 100
Because #id is such a heavily-weighted selector, it’s a good idea to avoid using ids as selectors in CSS as much as possible. They’re much harder to override in subsequent styling.
If other styling in the page includes a rule such as this (for example):
To get this right, inspect the element using your browser’s Web Inspector tools, and see what other CSS is getting applied. Then write your own CSS with enough specificity to override the existing default styling.
Problem :
I want to set border width to 0px, but border style doesn’t work when I use class selector. On the other hand, the border width worked if I use id selector!