I have the following code in my JavaScript&CSS to create a div & set a bg image :
var incrementEnabled = document.createElement('div');
incrementEnabled.className = "SchedMainCtrlIncrementBtn_En";
this.divElt.appendChild(incrementEnabled);
.SchedMainCtrlIncrementBtn_En {
background-color: white;
float:left;
position: fixed;
width:230px;
height:65px;
top:125px;
left:360px;
background:url("../images/icons/IcnListAddRecipient_En.png") no-repeat center;
path of url is also proper but image is not getting set.
Thanks
Sneha
Did you check with firebug (or any other developer tools in your favorite browser) what happens?
And why are you using float AND position:fixed? The float:left doesn’t do anything.
And btw, I always use single quotes, it’s just fine using them 🙂