Jump to content
php.lv forumi

Div fona bilde un iekš tā div cita bilde


ziedinjsh

Recommended Posts

Sveiki!

 

Es iekš php fusion meiģinu uztaisīt tādu lietu kā:

 

echo "<div style='background-image:url('".IMAGES."avatars/".$userdata['user_avatar']."')'><img src='loading.gif'></div>";

 

Lai div fona bilde ir lietotāja avatars un virs avatāra rādas loading.gif bilde, bet kad uztaisu šādi nerādās background!

Link to comment
Share on other sites

es uztaisīju šādi. Man strādā.

 

HTML/PHP:

echo "<div id='setuser-i'>";
echo "<div id='setuser-inside' style='background-image:url(kkāda_bilde.jpg);'><img src='images/setuser3.gif'></div>";
echo "</div>";

CSS:

#setuser-i{
border:1px solid #cccccc;
background-repeat:no-repeat;
padding:5px;
width:120px;
margin:0 auto;
margin-top:10px;
text-align:center;
vertical-align:middle;
}
#setuser-inside{
background-repeat:no-repeat;
width:120px;
height:120px;
overflov:hidden;
padding-top:20px;
}

Edited by ziedinjsh
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...