467,074 Members | 901 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,074 developers. It's quick & easy.

Using Tables to create an image

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
  • viewed: 1531
Share:
4 Replies
ronverdonk
Expert 4TB
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 512MB
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
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 4TB
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.

Similar topics

1 post views Thread by Daveyk0 | last post: by
8 posts views Thread by John | last post: by
2 posts views Thread by Scamjunk | last post: by
2 posts views Thread by Bouzy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.