e1seix Posted June 12, 2008 Share Posted June 12, 2008 Hi all, having a bit of problem with the following: echo '<div id="bottomImage"> <a href="/viewItem.php?sku='.$row[sku].'"> <img alt="'.$row[name].'" height="98px" src="/images/'.$row[image].'.jpg" width="98px" /> </a> </div>'; echo '<div id="bottomName"> <a href="/viewItem.php?sku='.$row[sku].'">'.$row[brand].' - '.$row[name].'</a> </div>'; I want to go about setting background-image of "bottomImage" to the image tag source, however the root of the image is 250px by 250px whereas to fit within the confines of bottomImage it would need to be a maximum of 100px by 100px. Also on the side, I would set some sort of transparent gif where the image tag is now. I cannot figure out how I'd go about doing this, especially limiting the background-image url to just 100px by 100px. Any help? Many thanks Quote Link to comment Share on other sites More sharing options...
MishieMoo Posted June 12, 2008 Share Posted June 12, 2008 Firstly, if you have a 250px x 250px image and you need it to be smaller, just resize it. That's the best solution to that problem. And then you don't have to worry about the quality of the image when its resized in the browser. And what do you mean some sort of transparent gif on the side? Like another tiling background-image? Why do you need a transparent gif (which I'm assuming means a small image that's completely clear)? If you want a space before something starts, use a margin. 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.