ngreenwood6 Posted November 20, 2009 Share Posted November 20, 2009 I am trying to use a background image in css on a div. I am able to get it to work but I was wondering if I am missing something. Basically I have this: css #something{ background:url(images/image.png) no-repeat; } template <div id="something"> </div> If you notice in between the div tabs I have a non breaking space. The reason for that is because without it the background image isnt showing up. Is that the proper way to do it or is there something I am missing? Quote Link to comment Share on other sites More sharing options...
vinpkl Posted November 20, 2009 Share Posted November 20, 2009 is it showing perfect in all browsers. vineet Quote Link to comment Share on other sites More sharing options...
haku Posted November 20, 2009 Share Posted November 20, 2009 You don't need the space (actually you should remove it, since it's unnecessary content). You just have to set a height and a width to the div. Quote Link to comment Share on other sites More sharing options...
ngreenwood6 Posted November 20, 2009 Author Share Posted November 20, 2009 Thanks haku...I knew I was missing something lol Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.