This should be a really simple problem, but I can’t quite figure out what I am doing wrong. I am trying to access the CSS property ‘border-bottom’ like this:
var temp = $('#divName').css('border-bottom');
Unfortunately, after this, temp contains the string ""
Does anyone know why this is not working or what I should do differently to make it function? Thanks.
The styles have to be more specific. Since
border-bottomis a short-property for other properties (similar tobackground, to name a common one), the property has to be explicitly given.Fiddle: http://jsfiddle.net/6wRj4/
See also: MDN:
border-bottomshort-hand.