My question is related to some design ie. css. I want to print some rows of database, in such way that i want even rows have different background color and odd row numbers have different background colors.. could someone tell i could do it.
Thanks.
displaying mysql rows with different background colors?
Started by Macintosh, Apr 02 2007 01:47 AM
3 replies to this topic
#1
Posted 02 April 2007 - 01:47 AM
#2
Posted 02 April 2007 - 02:13 AM
above the mysql while statment put
then put while statment in
whileblablabala
then inside the while statment at the bottom put
then when you print a row, if you use divs fir instance, u would put
$oddeven = "#DDDDDD"; changing colour to what you want
then put while statment in
whileblablabala
then inside the while statment at the bottom put
then when you print a row, if you use divs fir instance, u would put
echo"
<div style=\"background: $oddeven\">".$rows['sumthing']."</div>
";
if($oddeven == '#DDDDDD'){
$oddeven = "#EEEEEE";
} else {
$oddeven = "#DDDDDD";
}
close the while statment here
Edited by curthard89, 02 April 2007 - 02:16 AM.
#3 _*Creative Insanity_*
Posted 02 April 2007 - 02:17 AM
If you are using DW there is a free extension that does that.
http://www.technocur...hp?fn=downloads
http://www.technocur...hp?fn=downloads
#4
Posted 02 April 2007 - 02:19 AM
kool, i use textwrangler, nice free app for a mac, color codes and stuff,
pretty much plain text editor but hey, mac g5's are so lush
pretty much plain text editor but hey, mac g5's are so lush
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
