ziedinjsh Posted September 4, 2009 Report Share Posted September 4, 2009 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! Quote Link to comment Share on other sites More sharing options...
euphoric Posted September 4, 2009 Report Share Posted September 4, 2009 Man līdzīga problēma : <img src="raamis.png" style="border:none; background:url('bilde.jpg');"> Tātad ir rāmītis un iekš rāmīša rādas bilde, uz visiem browseriem strada iznjemot IE6 ? Varbūt kāds zin, kas par vainu un kā to labot ? Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted September 4, 2009 Author Report Share Posted September 4, 2009 (edited) 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 September 4, 2009 by ziedinjsh Quote Link to comment Share on other sites More sharing options...
briedis Posted September 4, 2009 Report Share Posted September 4, 2009 (edited) ziedinjsh, tev tur kļūda - overflov:hidden; pareizi ir overfloW un vēl - margin:0 auto; margin-top:10px; margin:[Te ir jānorāda px no augšas] 0; tavā gadījumā: margin:10px auto; :) Edited September 4, 2009 by briedis Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted September 4, 2009 Author Report Share Posted September 4, 2009 margin:0 auto; tas ir lai div ir iecentrēts.. tas pats kas margin-left:auto; margin-right:auto; :) Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted September 5, 2009 Report Share Posted September 5, 2009 margin:10px auto; Būs 10px gan no augšās gan no apakšas. Ja vajag tikai no augšas, tad var norādīt margin:10px auto 0; 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.