I set background-image to a couple of span elements, but they are not displayed, I think, because my height and width settings are ignored.
HTML source:
<div class="textwidget"> <a href="#" title="Start here"><span id="starthere" class="sidebar-poster"></span></a> <a href="#" title="Primary documents"><span id="#primarydocs" class="sidebar-poster"></span></a> <a href="#" title="Donate"><span id="donate" class="sidebar-poster"></span></a> </div>
CSS
span.sidebar-poster { margin-bottom: 10px; background-repeat: no-repeat; width: 160px; } span#starthere { background-image: url(/betatesting/wp-content/themes/dynamik/css/images/brunelwantsyou180.jpg); height: 285px; } span#starthere:hover { background-image: url(/betatesting/wp-content/themes/dynamik/css/images/brunelwantsyou_hover.jpg); } span#primarydocs { background-image: url(/betatesting/wp-content/themes/dynamik/css/images/brunelwantsyou180.jpg); height: 285px; } span#primarydocs:hover { background-image: url(/betatesting/wp-content/themes/dynamik/css/images/brunelwantsyou_hover.jpg); } span#donate { background-image: url(/betatesting/wp-content/themes/dynamik/css/images/donatebutton.jpg); height: 285px; } span#donate:hover { background-image: url(/betatesting/wp-content/themes/dynamik/css/images/donateposter_hover.jpg); }
None of the background images are actually visible.
In the Chrome Developer Tools, under the Computed Style section, these two spaces have a background image. If I copy and paste the URL of this image, I see the image. But nothing really does.
[UPDATE - this part has been resolved, thanks] In the Chrome developer tools, according to the agreed rules, only the #starthere and #donate actually dial the background-image attribute. Mileage #primarydocs - no. Why not?
html css
AP257 Jan 17 '11 at 18:05 2011-01-17 18:05
source share