Basma Posted January 21, 2011 Report Share Posted January 21, 2011 (edited) Sveiki, ir tabula : comment_id material_id author comment_text date -------------------- visos laukos pievienojas bez paragrāfiem, izņemot comment_text! Kaut norādu paragrāfos vai pievienoju klasi CSS, commen_text, vienalga ieliek <p>Kaut kāds teksts</p> Kā tikt galā? KODS: <?php foreach ($comments_list as $item):?> <div class="comments_form"> <p class="comments_date">Datums: <?=$item['date'];?></p> <p class="comments_author"><?=$item['author'];?></p> <?=$item['comment_text'];?> </div> <?php endforeach;?> Edited January 21, 2011 by Basma Quote Link to comment Share on other sites More sharing options...
briedis Posted January 21, 2011 Report Share Posted January 21, 2011 Reāli nesaprotu. Pārādi piemēru, kā ir pareizi un kā nav. Quote Link to comment Share on other sites More sharing options...
Basma Posted January 22, 2011 Author Report Share Posted January 22, 2011 Briedi!! šeit Quote Link to comment Share on other sites More sharing options...
mad182 Posted January 22, 2011 Report Share Posted January 22, 2011 Gan jau ka lieto kaut kādu javascript WYSIWYG redaktoru, vai arī paragrāfs tiek pielikts pie ievitošanas datubāzē. Man drīzāk jautājums, ko viņš Tev ļaunu dara, ka vajag tikt vaļā? Tekstu vajag dalīt paragrāfos. Quote Link to comment Share on other sites More sharing options...
briedis Posted January 22, 2011 Report Share Posted January 22, 2011 Nu gan jau ka pats pievienoji to tagu, kad liki db. Klausi mad komentāru. Vari izmantot funkciju strip_tags(), lai aizvāktu visu tagus (vai kādu konkrētu), vai arī salabot problēmas cēloni - datu ievietošanu. Quote Link to comment Share on other sites More sharing options...
Basma Posted January 22, 2011 Author Report Share Posted January 22, 2011 Ļaunu neko nedara, man vienkārši vajag stilu nomainīt ja es uzlieku viņam stilu, viņš iekšā stilā iemet paragrāfos, tur jau tā vaina! Briedis paldies funcija noder! Quote Link to comment Share on other sites More sharing options...
mad182 Posted January 22, 2011 Report Share Posted January 22, 2011 Un kas traucē uzlikt stilu paragrāfam? :) Quote Link to comment Share on other sites More sharing options...
Basma Posted January 22, 2011 Author Report Share Posted January 22, 2011 Traucē: <p class="comment_text_form"><p><?=$item['comment_text'];?></p></p> Pareizi: <p class="comment_text_form"><?=$item['comment_text'];?></p> Kā dabūt pareizo variantu varbūt iemest <div></div> un CSS failā norādi ja div klasē parādas paragrāfi tad stilus tādu tādus!!? Quote Link to comment Share on other sites More sharing options...
nemakuphp Posted January 22, 2011 Report Share Posted January 22, 2011 (edited) Iekš CSS p.comment_text_form p { tavs stils } Edited January 22, 2011 by nemakuphp Quote Link to comment Share on other sites More sharing options...
briedis Posted January 22, 2011 Report Share Posted January 22, 2011 (edited) Iekš CSS p.comment_text_form p { tavs stils } Tu ne tikai nemakiphp, bet arī nemakihtml :) Iekš P taga nedrīksts būt citi blok-veida elementi (arī p tagi!) Edited January 22, 2011 by briedis Quote Link to comment Share on other sites More sharing options...
mad182 Posted January 22, 2011 Report Share Posted January 22, 2011 Kaut kā tā būtu tuvāk īstenībai .comments_form p { font-size:13px; color: #777; } .comments_form p.comments_date { font-size:11px; color: #333; } Quote Link to comment Share on other sites More sharing options...
Basma Posted January 22, 2011 Author Report Share Posted January 22, 2011 Mad182 Pateicos!!! Quote Link to comment Share on other sites More sharing options...
nemakuphp Posted January 22, 2011 Report Share Posted January 22, 2011 Tu ne tikai nemakiphp, bet arī nemakihtml :) Iekš P taga nedrīksts būt citi blok-veida elementi (arī p tagi!) Nojausma jau bija, bet nu jā, nezinu perfekti visu HTML, priekš tam ir validators, kurš gan parasti nebļauj Quote Link to comment Share on other sites More sharing options...
daGrevis Posted January 22, 2011 Report Share Posted January 22, 2011 Par to tas, protams, ka bļautu! =( 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.