formatting html page output using css and php -


i write out list of available players html page--however list 65 players long. split html page out using following css

#right_side {   float: right;   margin: 20px 0px 20px 0px;   width: 500px;   height: 675px;   border: 1px solid #cccccc;   font-family: italic; } 

the php code loops through list in following way:

while($row = mysql_fetch_array($result)){     echo "<li>".$row['firstname'] . " " . $row['lastname']."</li>";     echo"<br>";     } 

how break results 3 columns of 20 instead of 1 column of 60?

add following css

li  {       display:inline-block;       width:30%; } 

this give you

1 | 2 | 3

4 | 5 | 6

etc

see here: http://jsfiddle.net/cmw7t/


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -