Page 1 of 1

Beautiful grid

Posted: Tue Dec 29, 2009 5:42 pm
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

Re: Beautiful grid

Posted: Tue Dec 29, 2009 9:26 pm
by josh

Re: Beautiful grid

Posted: Tue Dec 29, 2009 9:31 pm
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.

Re: Beautiful grid

Posted: Wed Dec 30, 2009 7:30 pm
by mariolopes
Hum...
Thank you I thought there is a easy way :oops:

Re: Beautiful grid

Posted: Wed Dec 30, 2009 7:39 pm
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.