Beautiful grid

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mariolopes
Forum Contributor
Posts: 102
Joined: Sun May 22, 2005 7:08 am

Beautiful grid

Post by mariolopes »

Hi
I allways see beautiful pages in php for example when show the results of one consult to a database. My question is: I know how can I select elements for one database but i don't know how to show the results with colors, grids etc. I heard that the people uses classes for doing that. Can anyone help me how can achieve this?
Thank you
mario
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Beautiful grid

Post by josh »

User avatar
omniuni
Forum Regular
Posts: 738
Joined: Tue Jul 15, 2008 10:50 pm
Location: Carolina, USA

Re: Beautiful grid

Post by omniuni »

What you need is some good CSS.

(CSS Classes)

for example:

.negativeValue{
background-color: red;
color: white;
font-weight: bold;
}

Applied to a <td> (<td class="negativeValue">-$230</td>) would make you a nice red box with a white number. If you want, I can give you a better example, but if you go learn some CSS, you should be able to figure it out for yourself.
mariolopes
Forum Contributor
Posts: 102
Joined: Sun May 22, 2005 7:08 am

Re: Beautiful grid

Post by mariolopes »

Hum...
Thank you I thought there is a easy way :oops:
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Re: Beautiful grid

Post by daedalus__ »

css is super easy

and if you want alternating row colors you can use the new nth-child selectors they are very delicious.
Post Reply