I am dynamically creating a div using jQuery and then adding a class to it in order to style it:
var borderDiv = $('<div />').addClass('borderTaco');
// add borderDiv to the DOM...
Where borderTaco is defined to be the following style:
.borderTaco {
background-color : #cde;
z-index : 1;
height : 100%;
}
Even though the element is being properly inserted into the DOM, the style doesn’t seem to be applied to the div. When I inspect the element in firebug, it indicates that the element does have the correct class attribute, but it has no style rules and doesn’t appear correctly.
Here is a jsbin of the code.
Your class is used in an iframe so the class should be defined in this iframe.