table help
7 posts
Page 1 of 1
Hello,
Im needing some help please i want my table to displat like this
Mark Mark Mark
but at the moment its going like this
Mark
Mark
Mark
Can anyone help me please this is the code i have for them to go like
Mark
Mark
Mark
Im needing some help please i want my table to displat like this
Mark Mark Mark
but at the moment its going like this
Mark
Mark
Mark
Can anyone help me please this is the code i have for them to go like
Mark
Mark
Mark
Code: Select all
<?php
$query = mysql_query("SELECT * FROM users WHERE online='1' ORDER BY id DESC LIMIT 5");
$numrows = mysql_num_rows($query);
if ($numrows > 0){
echo '<table><tbody>';
while($row = mysql_fetch_assoc($query)){
$id = $row['id'];
$username = $row['username'];
$email = $row['email'];
echo "<tr><td><div class=\"noline\"><a href='mailto:$email'>$username</a></div></td></tr>";
}
echo '</tbody></table>';
}
else
echo "<div class=\"noline\">No users are online!.</div>";
?>
Code: Select all
<?php
$query = mysql_query("SELECT * FROM users WHERE online='1' ORDER BY id DESC LIMIT 5");
$numrows = mysql_num_rows($query);
if ($numrows > 0){
echo '<table><tbody><tr>';
while($row = mysql_fetch_assoc($query)){
$id = $row['id'];
$username = $row['username'];
$email = $row['email'];
echo "<td><div class=\"noline\"><a href='mailto:$email'>$username</a></div></td>";
}
echo '</tr></tbody></table>';
}
else
echo "<div class=\"noline\">No users are online!.</div>";
?>
CodenStuff wrote:Nope, it's just your sick and dirty mind. You sick twisted warped little pervo![]()
Hi that worked but is there anyways that i can put only so many per line?
Hi,
Alternatively you can put each element within a div within a parent and assign parent with class which would have CSS properties as follows:
KR,
-Filip
Alternatively you can put each element within a div within a parent and assign parent with class which would have CSS properties as follows:
Code: Select all
That code would put text in boxes going one after another in one infinitive scrolling parent..classname div {
display: inline-block;
}
.classname {
white-space: nowrap;
overflow-x: scroll
}
KR,
-Filip
CodenStuff wrote:Nope, it's just your sick and dirty mind. You sick twisted warped little pervo![]()
hi filip,
do you have an example?
if you look here youll see what i mean
http://yansumkune.com/members.php
do you have an example?
if you look here youll see what i mean
http://yansumkune.com/members.php
Mark wrote:hi filip,Hello,
do you have an example?
if you look here youll see what i mean
http://yansumkune.com/members.php
Sorry, I'm currently on a trip and I don't have my laptop with me so I'm not able to do it on live example. I'm coming home on Saturday so I'll be able to do it..
KR,
-Filip
CodenStuff wrote:Nope, it's just your sick and dirty mind. You sick twisted warped little pervo![]()
What do you mean by so many per line?
I can see Filips code limits to 5 results
I can see Filips code limits to 5 results
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
7 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023