php - How to style image in variable? -


i have image being pulled out of forum (avatars), every time grab them, not fitting div, no matter do, i'm wondering how can fit image inside div?

here's line i'm talking about:

<div id="image">'.$ipbwi->member->photo($friend['friends_friend_id']).'</div> 

and here's whole foreach:

<?php $friends = $ipbwi->member->friendslist(false,true); foreach($friends $friend){ echo ' <div class="friend"> <div id="image">'.$ipbwi->member->photo($friend['friends_friend_id']).'</div> <div class="username">'.$ipbwi->member->id2displayname($friend['friends_friend_id']).'</div> </div> '; } ?> 

i'm using ipbwi pull data ipb forum , scale images (example) 40x40px.

edit:

here's css i'm using img on div: #friend #image img{width: 40px; height: 40px;}

thanks in advance!

try adding style rule

.friend img { max-width:100px; max-height:100px } 

Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -