Jump to content

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


Bhaal

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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.