Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [inne]jak w fieldset, jak w fieldset
pawlo20
post
Post #1





Grupa: Zarejestrowani
Postów: 112
Pomógł: 0
Dołączył: 31.08.2012

Ostrzeżenie: (40%)
XX---


obramowałem se skrypt komentarzy obramowaniem fieldset i mam problem bo jak sie napisze długi komentarz to nie przeskakuje do nowej lini tylko wyłazi poza obramowanie , nie wieta jak to zrobić
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
pawlo20
post
Post #2





Grupa: Zarejestrowani
Postów: 112
Pomógł: 0
Dołączył: 31.08.2012

Ostrzeżenie: (40%)
XX---


  1. <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
  2. <link href="arkusz.css" rel="stylesheet" type="text/css">
  3. <link rel="stylesheet" href="kom.css" type="text/css" />
  4. <div class="center">
  5.  
  6. <div id="panel">
  7.  
  8.  
  9. <?php
  10. $nazwa = 'komen.txt';//CHMODY 0777
  11. if($_POST['autor'] & $_POST['email'] & $_POST['tresc']
  12. )
  13. {
  14. $fp=fopen($nazwa, 'a');
  15. flock($fp, 3);
  16. $date=date('H:i d.m.Y');
  17. fwrite($fp,'<p class="author">'.$autor. '</p> <p class="daty">'.$date.'</p> <p class="mail">'. strip_tags(strtr($email ,' \n',' ')).'</p> <p class="koment">'.$tresc.'</p><br> <HR> \n');
  18. flock($fp, 3);
  19. fclose($fp);
  20. }
  21.  
  22. // jezeli juz istnieja jakies komentarze
  23. if(is_file($nazwa))
  24. {
  25. $linia = explode('\n',file_get_contents($nazwa));
  26. $ilosc = count($linia);
  27. for($i=0; $i<$ilosc; $i++)
  28. {
  29. $komentarz = explode('||',$linia[$i]);
  30. echo '<br /><b>'.$komentarz[0].'</b><br />'.$komentarz[1].'<br /><i>'.$komentarz[2].'</i><br />';
  31. }
  32. }
  33. else{
  34. echo '<k>Jeszcze nie ma żadnych komentarzy. Bądz pierwszy i skomentuj!</k><br /><br />';
  35. }
  36. ?>
  37.  
  38.  
  39. <form action="" method="POST">
  40.  
  41.  
  42.  
  43. <form>
  44. <label for="username">Nick:</label>
  45. <input type="text" id="username" name="autor" required="required"placeholder="nick">
  46.  
  47. <label for="username">E-mail:</label>
  48. <input type="text" id="password" name="email" required="required"placeholder="email">
  49.  
  50. <label for="username">treść:</label>
  51. <textarea cols="40" id="textarea" name="tresc" required="required"placeholder="treść"required="required"placeholder="treść"rows="7"></textarea>
  52.  
  53. <div id="lower">
  54.  
  55. <input type="submit" value="dodaj komentarz">
  56. </div>
  57. </form>
  58. </div>
  59.  
  60. </div>
  61. </body>

a to css
  1. HR {
  2. WIDTH: 400px;
  3. HEIGHT: 2px;
  4. margin-top: +10px;
  5. background-color: red;
  6. }
  7.  
  8. label {
  9. color: black;
  10. font-size: 17px;
  11. font-weight: bold;
  12. width: 75px;
  13. margin-left: +10px; }
  14. fieldset {
  15. border: 1px solid yellowgreen;background-color: blanchedalmond;
  16. margin-top: 0px;
  17. margin-left: +10px;
  18. padding: 7px;
  19. width: 450px;
  20. }
  21.  
  22.  
  23.  
  24. .author {
  25. font-family: sylfen;
  26. font-size:17px;
  27. color: black;
  28. margin-top: +5px;
  29. margin-left: +1px;
  30. }
  31.  
  32.  
  33.  
  34. .mail {
  35. font-family: sylfen;
  36. font-size:15px;
  37. color: green;
  38. margin-top: -30px;
  39. margin-left: +60px;
  40. }
  41.  
  42. .daty {
  43. font-family: sylfen;
  44. font-size:14px;
  45. color: red;
  46. margin-top: -40px;
  47. margin-left: +300px;
  48. margin-right: -300px;
  49. }
  50.  
  51. .koment {
  52. font-family: sylfen;
  53. font-size:17px;
  54. color: brown;
  55. margin-top: +10px;
  56. margin-left: +1px;
  57. }
  58.  
  59. k{
  60. font-family: sylfen;
  61. font-size:19px;
  62. color:red;
  63. }
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 16.10.2025 - 06:43