By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,677 Members | 1,798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,677 IT Pros & Developers. It's quick & easy.

Using Tables to create an image

P: 6
To the group.

I apologize if tables is the incorrect option for the following but it is mandatory for this assignment.

I am trying to create a image of the American Flag. The issue I am having is after I do the first row (with stars in the blue area) and add the second row, the stars above in the first row get messed up since the width of the td's are different for the second row and so on....How do I keep each row independant of previous or successive rows?

thanks

Steve
Feb 28 '08 #1
Share this Question
Share on Google+
4 Replies


ronverdonk
Expert 2.5K+
P: 4,258
If you insist on using a table and want it all within 1 table, I suggest you make some sort of grid, whereby each grid-cell is a <td> in your table. Forgive the rought sketch, but you'll get the idea. You can fill in cells using the 'colspan=x' attrubute.
Expand|Select|Wrap|Line Numbers
  1.  1 1 1 1 1 1 1 1    1
  2. +-+-+-+-+-+-+-+-+------------------------------+
  3. |*| |*| |*| |*| |                              |
  4. +-+-+-+-+-+-+-+-+------------------------------+
  5. | |*| |*| |*| |*|                              |
  6. +-+-+-+-+-+-+-+-+------------------------------+
  7. |*| |*| |*| |*| |                              |
  8. +-+-+-+-+-+-+-+-+------------------------------+
  9. | |*| |*| |*| |*|                              |
  10. +-+-+-+-+-+-+-+-+------------------------------+
  11. |                colspan=9                     |
  12. +----------------------------------------------+
  13. |                colspan=9                     |
  14. +----------------------------------------------+
Ronald
Feb 28 '08 #2

nomad
Expert 100+
P: 664
To the group.

I apologize if tables is the incorrect option for the following but it is mandatory for this assignment.

I am trying to create a image of the American Flag. The issue I am having is after I do the first row (with stars in the blue area) and add the second row, the stars above in the first row get messed up since the width of the td's are different for the second row and so on....How do I keep each row independant of previous or successive rows?

thanks

Steve
You could also do it this way:
1. make a table 9 rolls 12 cols with a blue background have the align="left" This is for the stars. This blue is for the field and you make the stars every other roll
2. next to table make another table 7 rolls 1 col. have that align="left" This is for the red and white you will need to adjust so that the red and whites are equal in height and that last roll matches the blue field. ie use the backgound for the red and white
3. make another table this one is 6 rolls, 1 col have the align =Left. same thing red and white backgrounds.

there is your flag.

nomad
PS if you're hand coding then make one roll at a time.
ie for the stars and blue field make your first two rolls. then copy those two rolls.
and paste them under the last roll
some them for the red and white sections.

also make comments for each roll ie
//this is the first roll for stars
// this is the second roll of stars.
Feb 28 '08 #3

P: 6
Thank you all, both suggestions were great, worked well!

One other question, what is the best book in the groups opinion on CSS? I don't want a beginner book, or just merely a reference book, somthing in between that lists all of the different CSS elements, but also show examples. Much rather have the unknown or little documented type of book.

thanks

Steve
Feb 29 '08 #4

ronverdonk
Expert 2.5K+
P: 4,258
We are here to serve. See you next time.

Ronald
Feb 29 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.