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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -