Bhaal Posted March 14, 2006 Share Posted March 14, 2006 Hi,Yep I'm a newbie.OK - I know how to display data in rows and columns (yippee!) and I understand formatting with CSS, but this is something special (IMHO):[a href=\"http://www.convictmailbag.com/prisoner_list.php\" target=\"_blank\"]http://www.convictmailbag.com/prisoner_list.php[/a]This displays [FirstName] [LastName] in nice, neat columns.[b]What I don't get is how they limit one column and start another at the top of the page to populate the entire page.[/b] Most examples I've seen for displaying data simply list a bunch of rows in a single column - this is very different, or I'm just missing something.(There aren't enough records in the db to start a 2nd page, but I assume there is code to paginate to the next page.)Then the results are styled with CSS; bonus styling to differentiate between male and female.Any help is greatly appreciated - I'd love to be able to recreate this.Thanks!_Bhaal Quote Link to comment Share on other sites More sharing options...
AV1611 Posted March 14, 2006 Share Posted March 14, 2006 They're not going top to bottom left to right, they're going left to right top to bottom... Quote Link to comment Share on other sites More sharing options...
keeB Posted March 14, 2006 Share Posted March 14, 2006 The only PHP used on this page is to differenciate between male and female, the prisonerID (located in the link), and the list of prisoners. The rest is formatting ( looks like a <div> style located in [a href=\"http://www.convictmailbag.com/mailstyles.css\" target=\"_blank\"]http://www.convictmailbag.com/mailstyles.css[/a] ) Welcome to the world of CSS and all of it's wonders. Quote Link to comment Share on other sites More sharing options...
obsidian Posted March 14, 2006 Share Posted March 14, 2006 [!--quoteo(post=355008:date=Mar 14 2006, 02:13 PM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 14 2006, 02:13 PM) [snapback]355008[/snapback][/div][div class=\'quotemain\'][!--quotec--]Welcome to the world of CSS and all of it's wonders.[/quote]no kidding... this is a pretty good use of it. it looks like they just have a fixed width on their content, and then they simply float their links knowing that they will wrap every 4th one. plus, since the links have a fixed width, they will line up all the way down automatically. Quote Link to comment Share on other sites More sharing options...
Bhaal Posted March 15, 2006 Author Share Posted March 15, 2006 Ahhh - I think I get it. It's the CSS doing all the formatting. Every name is floated left so every 4th (or 5th) ones wrap automatically within the width of the outer div and then just stack up left to right then top to bottom.Sweet!Thanks - I was freaking out on how to do this formatting with PHP...(oh, you silly newbie, you...)I don't suppose there are any good tutorials for formatting the results of a query with CSS (without tables) are there?Thanks for the help! Quote Link to comment Share on other sites More sharing options...
keeB Posted March 15, 2006 Share Posted March 15, 2006 There's a forum on this site with some CSS experts.. go give them a chat! 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.