Zaloguj | Zarejestruj | FAQ
Anonymous

Code needed for table

+ Odpowiedz

Posty: 8 Strona 1 z 1


Code needed for table

przez SickSquirrel » Cz sty 16, 2014 1:41 am

Hi, I need to create a webpage for photos. Three across, unlimited rows down. (If you could please give me the first line, I will replicate it for my pics plus blank rows).

The size will be 200x300 but I may be wrong on the length at 300. I can edit when I'm sure.

If someone could supply the code for this table, I will add the beginning and footer code.

Thank you
Avatar użytkownika

SickSquirrel

  • Posty: 4
  • Dołączył(a): Cz sty 16, 2014 1:33 am
  • Lokalizacja: Dartmouth MA

Re: Code needed for table

przez XainPro » Cz sty 16, 2014 7:47 pm

Kod: Zaznacz cały
<table width="200" border="1" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
Avatar użytkownika

XainPro

  • Posty: 3933
  • Dołączył(a): Pt lut 17, 2012 8:10 pm

Re: Code needed for table

przez SickSquirrel » Cz sty 16, 2014 9:01 pm

Thank you! My only question would be about table width. 200 is for one cell or all three? Shouldn't the width be 200x3+space-between or 660 (if space is 30)?
Avatar użytkownika

SickSquirrel

  • Posty: 4
  • Dołączył(a): Cz sty 16, 2014 1:33 am
  • Lokalizacja: Dartmouth MA

Re: Code needed for table

przez XainPro » Pt sty 17, 2014 1:07 pm

200 is for all three and yes you are right it should be 660 :)
Avatar użytkownika

XainPro

  • Posty: 3933
  • Dołączył(a): Pt lut 17, 2012 8:10 pm

Re: Code needed for table

przez SickSquirrel » Pt sty 17, 2014 4:29 pm

Thank you. If I want 30px between each cell or photo does that need to be coded? If so could you add it?
Avatar użytkownika

SickSquirrel

  • Posty: 4
  • Dołączył(a): Cz sty 16, 2014 1:33 am
  • Lokalizacja: Dartmouth MA

Re: Code needed for table

przez XainPro » Pn sty 20, 2014 7:20 pm

the beauty of table element is it will adjust automatically so i think no need to code it :)
Avatar użytkownika

XainPro

  • Posty: 3933
  • Dołączył(a): Pt lut 17, 2012 8:10 pm

Re: Code needed for table

przez SickSquirrel » Pn sty 20, 2014 8:19 pm

I'm not sure I understand. If I don't code in spaces between the cells of photos, won't they just be right next to each other?

I'd try it to check but the pics aren't sized yet
Avatar użytkownika

SickSquirrel

  • Posty: 4
  • Dołączył(a): Cz sty 16, 2014 1:33 am
  • Lokalizacja: Dartmouth MA

Re: Code needed for table

przez XainPro » Pn sty 20, 2014 8:44 pm

pics should be sized or have height and width attribute in html like
<img src="image.jpg" height="50" width="150" />

etc
try it it will adjust automatically if not then paste your code i will do it for you :)
Avatar użytkownika

XainPro

  • Posty: 3933
  • Dołączył(a): Pt lut 17, 2012 8:10 pm


+ Odpowiedz

Strona 1 z 1