Jump to content

Archived

This topic is now archived and is closed to further replies.

Bhaal

How did they do this??? (nice columns for displaying data)

Recommended Posts

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

Share this post


Link to post
Share on other sites
They're not going top to bottom left to right, they're going left to right top to bottom...

Share this post


Link to post
Share on other sites


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.

Share this post


Link to post
Share on other sites
[!--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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
There's a forum on this site with some CSS experts.. go give them a chat!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.