I am facing a challenge while trying to set the same background image for two div elements:
.abc { background: url('images/autogen.png') no-repeat 0px -133px; width: 256px; height: 256px; };
.def { background: url('images/autogen.png') no-repeat 0px -0px; width: 128px; height: 128px; };
Here is my HTML:
<html><head><meta charset="utf8"><link href='main.css' rel='stylesheet' type='text/css'' media='all' /></head><body>
<div class="def">def</div>
<div class="abc">abc</div></body></html>
However, only one of the div elements is displaying the background image. If I switch the order of the .def and .abc definitions in the CSS file, then .def gets displayed with the background and .abc does not.