background works fine with ffox and chroom but not showing in internet explorer
#h2{margin:0;padding:4px 10px;font-size:14px;background:url(images/cyo.jpg)no-repeat;color:white;}
<h2>Hello backgrnd not working</h2>
background works fine with ffox and chroom but not showing in internet explorer
#h2{margin:0;padding:4px 10px;font-size:14px;background:url(images/cyo.jpg)no-repeat;color:white;}
<h2>Hello backgrnd not working</h2>
What element does the id #h2 refer to? Not the <h2> tag. If <h2> is the intended target, delete the leading pound sign.
It would be best if you can give us a link to live code so we can tell how things work together.
h2{margin:0;padding:4px 10px;font-size:14px;background:url(images/cyo.jpg);color:white;}
no-repeat;
resolve
by the way why no-repeat; is not working in ie
h2{margin:0;padding:4px 10px;font-size:14px;background:url(images/cyo.jpg)no-repeat;color:white;}
<h2>Hello backgrnd not working</h2>
i know , but when i remove no-repeat; it works fine in ie, then css not repeat bg in ff and chroom , when i use no-repeat; it works fine in ff and chroom but not show in ie
Try putting a space in front of “no-repeat”. In other words,
instead of this:
h2{margin:0;padding:4px 10px;font-size:14px;background:url(images/cyo.jpg)no-repeat;color:white;}
do this:
h2{margin:0;padding:4px 10px;font-size:14px;background:url(images/cyo.jpg) no-repeat;color:white;}
Try setting height or min-height
Hey bitz!
Is that what you looking for http://jsfiddle.net/K79x5/embedded/result/ ? This example works on IE7+