barney0o0 — 2008-07-31T09:53:58-04:00 — #1
Hey chaps...i had this problem before, sorted it out, and now well, ive made changes and got myself into a right mess....
Ive got a trans png file that is 139 x 124. The loaded background thumb is 15 x 15 (just as a test). When i preview the image is also at top left, rather than centered
<div class="picholder2" style="background:url(<?php echo $row_Recordset1['thumb']; ?>) no-repeat;">
<img src="sitefiles/boxpng.png" width="139" height="124" alt="Bologni Associati: <?php echo $row_Recordset1['title']; ?>" /> </div>
background-position: center center;
thanks in advance for your slaps to the nape of my neck..
paulob — 2008-07-31T10:41:56-04:00 — #2
"background" is a shorthand property for all the background properties and for every property you omit to mention it reverts to its default and overrides any previous properties define that carry the same weight.
Therefore the default position for a background image is top left and not centered.
This will ensure that only the image is changed and not any other background settings that you have.
louis_lazaris — 2008-07-31T10:52:10-04:00 — #3
Nice catch, Paul -- I couldn't figure that one out.
paulob — 2008-07-31T11:53:38-04:00 — #4
Nice catch, Paul