ziedinjsh Posted June 19, 2011 Report Share Posted June 19, 2011 Sveiki! Radās problēmam kurai es nesaskatu iemeslu! echo "<div style='float:left;width:50px;height:50px;background-image:url('avatars/small/".$data['avatar']."')no-repeat;'></div>"; iekš ši DIV bgrounda neparādas avatāra bilde, bet ja atveru lapas avotu, nokopēju linku un iekopēja pārlūkā, bilde parādās!! Link to comment Share on other sites More sharing options...
daGrevis Posted June 19, 2011 Report Share Posted June 19, 2011 Šausmīgi! Pirmkārt, nepareizā sadaļa. Liec pie HTML. Otrkārt, kāda sakarā tur ir "echo"? Iedod HTML, kad tie izvadīts pārlūkā. Treškārt, neizmanto "in-line CSS". Es darītu tā, ka uzliktu "background: red" šim elementam. Pirmais "debug'ošanas" solis... Ja nekas nenotiktu, tad mēģinātu ar FireBug to atrast un paskatīties kādi "properties" tam ir piešķirti.... tādā garā. Link to comment Share on other sites More sharing options...
ziedinjsh Posted June 19, 2011 Author Report Share Posted June 19, 2011 man ir background:#fff; tas strādā!! šāds ir php: if(session_is_registered(email)){ $data = mysql_fetch_array(mysql_query("SELECT * FROM members WHERE email='".$_SESSION['email']."'")); echo "<div style='float:left;width:50px;height:50px;background:#fff;'>bilde</div>"; echo "<div style='float:left;padding-top:29px;padding-left:5px;padding-right:5px;min-width:50;max-width:500;'>"; echo "Čau <b>".$data['name']."</b> | <a href='profile.php?user=".$data['id']."&fnc=profile'>Profils</a> | <a href='logout.php'>Iziet</a>"; echo "</div>"; } atverot lapu izskatās šādi: <div style='float:left;width:50px;height:50px;background:#fff;'>bilde</div> <div style='float:left;padding-top:29px;padding-left:5px;padding-right:5px;min-width:50;max-width:500;'>Čau <b>D7</b> | <a href='profile.php?user=20&fnc=profile'>Profils</a> | <a href='logout.php'>Iziet</a></div></div><div style='clear:both;'> Link to comment Share on other sites More sharing options...
daGrevis Posted June 19, 2011 Report Share Posted June 19, 2011 Padari to kodu lasāmu. Tas nav lasāms! Paprasi Gugles tantei kas ir "in-line CSS"; atbrīvojies, atmet! Link to comment Share on other sites More sharing options...
ziedinjsh Posted June 19, 2011 Author Report Share Posted June 19, 2011 Paldies! Link to comment Share on other sites More sharing options...
Recommended Posts