Hello everyone,
My table is not showing right I have look over my code but I do not see anything wrong. So I figure I post it on here to see if any of you guys see it. Here it is
I am getting color to the table but not in the even rows just the color across the middle this is my code again. I am suppose to use modulus operators to set the background color. here is my code again.
You've only got 3 rows! So how do you expect to get colour into rows 4 and 6? I'm lost.
Can you post the expected html output. Just hand code it if you can. I'll be able to see what you're up to then.
Ok I am suppose to have four rows three cells per row. Which in mine i have 4 rows and 3 in each my rows are lable
1 2 3 4
5 6 7 8
9 10 11 12
I am sure that is what is asking. cause the cells in row 2 and 4 should have the blue backgound color(use modulus of the row which is (%2).
And then the odd numbers should have the background color of white.
I believe that is what mine shows beside my color blue is in the middle row and not where they are suppose to be.
Ok I trying to understand this stuff since i am new. Maybe I have my tables and rows mixed up. I am also suppose to use css class to change the bgcolot of the alternating rows so this is what I have so far I just dont know how to put that is the PHP.
Like I said, if you post a mockup image of what you're trying to achieve, it should be simple to produce the code for it. And yes, using CSS is better than using bgcolor. The difference to the code will be trivial as you'll be concerned with the classname attribute (I assume) as opposed to the bgcolor value.
No, this is not what I was talking about. You've pretty much posted the same code every time. I'm talking about the html output you expect to see or include a mock-up image of what it should look like in the browser. For example:
Ok I am still working on this. I know i need to create a css on my work this is what I have so far.I am still confused about this with PHP. If someone would be nice enough to explain so i can understand. I think I did the Css right but then i dont know to me right now it looks like a mess.But can someone please help me understand. The table is suppose to have this a width of 100 px, content is to be centered ,each cell contains its corresponding number ( first cell contains "1", second contains "2", etc ). The cells in rows 2 and 4 should have a background color of light blue (use modulus of the row (%2)).The cells in the odd rows should have a background color of white. I am also suppose to use separate counter to keep track of the numbers of rows. Use modulus operators to set background color. use CSS class to change the background of the alternating rows,get the table to print correctly before changing the background color. I though i will share all this so people have a better understanding of what I am suppose to do.
Here is my code so far: