Hi
I've created my database & the code to collect my data & show it on my web page. However when I scale the page the comments on the page spill over & do not scale with the comment box I've created (I'm using the bootstrap frame & adding my php code)
This the code php code i have -
<?php function setComments($conn) { if (isset($_POST['commentSubmit'])) { $uid = $_POST['uid']; $date = $_POST['date']; $message = $_POST['message']; $sqli = "INSERT INTO comments (uid, date, message) VALUES ('$uid', '$date', '$message')"; $result = mysqli_query($conn, $sqli); } } function getComments($conn) { $sqli = "SELECT * FROM comments order by cid desc"; $result = mysqli_query ($conn, $sqli); while ($row = mysqli_fetch_assoc($result)) { echo"<div class='comment-box'><p>"; echo $row['uid']."<br>"; echo $row['date']."<br>"; echo nl2br($row['message']); echo "</p></div>"; } }
and this is the css code -
.comment-box { width: 100%; height:auto; padding:5px; margin-top:0px; margin-bottom: 5px; background-color: white; border-radius: 4px; } .comment-box p { font-family: 'cooper black'; font-size: 14px; line-height: 16px; color: green; font-weight: 100; }
I've been on this for almost two days & cannot see why it will work.
Any help would great.
Thanks in advance