I need some help with my tables please

  • 1
  • Question
  • Updated 9 years ago
  • Answered
I managed to create two tables side by side. However, the second table as it is a bit smaller, aligns itself in the center. How do I bring up the table to the top like my other one? Here's a screenshot of my tables:

Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes

Posted 9 years ago

  • 1
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
Hi Littleus,

Try a table attribute of: valign=top

Emmy
Photo of UK Duke

UK Duke, Champion

  • 3321 Posts
  • 213 Reply Likes
correct. - do the same for both to keep them the same.
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Where do I put it? I tried to add <!--td valign="top">--> but it did not seem to work. Here's my code without the valign snippet.

<!--<div align="center">   
<table border="0" width="75%">
<tbody><tr><td align="center">
<table border="1" width="350">
<tbody><tr><td style="font-family: Verdana; font-weight: bold;" align="center" width="290">
CATERGORY

</td>

<td style="font-family: Verdana; font-weight: bold;" align="center" width="60">

CODE</td>

</tr>-->
Photo of Emmy

Emmy

  • 5892 Posts
  • 299 Reply Likes
put it here and see how it goes:

<!--<table border="0" width="75% valign="top">-->
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Unfortunately, this code did not work. I have two tables within one table. Here's the code:

<!--<div align="center">   
<table valign="top" border="0" width="75%">
<tbody><tr><td align="center">
<table border="1" width="350">
<tbody><tr><td style="font-family: Verdana; font-weight: bold;" align="center" width="290">
CATERGORY

</td>

<td style="font-family: Verdana; font-weight: bold;" align="center" width="60">

CODE</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

0-3 Months

</td>

<td style="font-family: Verdana;" align="center">

0</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

3-6 Months

</td>

<td style="font-family: Verdana;" align="center">

3

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

6-12 Months

</td>

<td style="font-family: Verdana;" align="center">

6</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

12-18 Months

</td>

<td style="font-family: Verdana;" align="center">

12

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

18-24 Months

</td>

<td style="font-family: Verdana;" align="center">

18

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Size 2

</td>

<td style="font-family: Verdana;" align="center">

S2<br></td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Size 3<br></td>

<td style="font-family: Verdana;" align="center">

S3

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Size 4<br></td>

<td style="font-family: Verdana;" align="center">

S4</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Toys & Baby Equipment<br></td>

<td style="font-family: Verdana;" align="center">

T<br></td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Freebies<br></td>

<td style="font-family: Verdana;" align="center">

T<br></td>

</tr>
</tbody></table>
</td><td align="center">
<table border="1" width="350">
<tbody><tr><td style="font-family: Verdana; font-weight: bold;" align="center" width="290">
SUB-CATERGORY

</td>

<td style="font-family: Verdana; font-weight: bold;" align="center" width="60">

CODE

</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

Shirts

</td>

<td style="font-family: Verdana;" align="center">

S</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

Pants & Skirts

</td>

<td style="font-family: Verdana;" align="center">

P</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Dresses

</td>

<td style="font-family: Verdana;" align="center">

D</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Outfits

</td>

<td style="font-family: Verdana;" align="center">O</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

PJS & Onesies

</td>

<td style="font-family: Verdana;" align="center">

PJ

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Outerwear

</td>

<td style="font-family: Verdana;" align="center">

OW

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Miscellaneous</td>

<td style="font-family: Verdana;" align="center">

M</td>

</tr>
</tbody></table>
</td>
</tr></tbody></table></div>-->
Photo of Connor McCarra

Connor McCarra, Champion

  • 944 Posts
  • 47 Reply Likes
You have to place the valign in the 'tr' tag. Copy this code, it is what you want:

<!--<div align="center">
<table valign="top" border="0" width="75%">
<tbody><tr valign="top"><td align="center">
<table border="1" width="350">
<tbody><tr><td style="font-family: Verdana; font-weight: bold;" align="center" width="290">
CATERGORY

</td>

<td style="font-family: Verdana; font-weight: bold;" align="center" width="60">

CODE</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

0-3 Months

</td>

<td style="font-family: Verdana;" align="center">

0</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

3-6 Months

</td>

<td style="font-family: Verdana;" align="center">

3

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

6-12 Months

</td>

<td style="font-family: Verdana;" align="center">

6</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

12-18 Months

</td>

<td style="font-family: Verdana;" align="center">

12

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

18-24 Months

</td>

<td style="font-family: Verdana;" align="center">

18

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Size 2

</td>

<td style="font-family: Verdana;" align="center">

S2<br></td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Size 3<br></td>

<td style="font-family: Verdana;" align="center">

S3

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Size 4<br></td>

<td style="font-family: Verdana;" align="center">

S4</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Toys & Baby Equipment<br></td>

<td style="font-family: Verdana;" align="center">

T<br></td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Freebies<br></td>

<td style="font-family: Verdana;" align="center">

T<br></td>

</tr>
</tbody></table>
</td><td align="center">
<table border="1" width="350">
<tbody><tr><td style="font-family: Verdana; font-weight: bold;" align="center" width="290">
SUB-CATERGORY

</td>

<td style="font-family: Verdana; font-weight: bold;" align="center" width="60">

CODE

</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

Shirts

</td>

<td style="font-family: Verdana;" align="center">

S</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

Pants & Skirts

</td>

<td style="font-family: Verdana;" align="center">

P</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Dresses

</td>

<td style="font-family: Verdana;" align="center">

D</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Outfits

</td>

<td style="font-family: Verdana;" align="center">O</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

PJS & Onesies

</td>

<td style="font-family: Verdana;" align="center">

PJ

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Outerwear

</td>

<td style="font-family: Verdana;" align="center">

OW

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Miscellaneous</td>

<td style="font-family: Verdana;" align="center">

M</td>

</tr>
</tbody></table>
</td>
</tr></tbody></table></div>-->

Connor
Photo of Kershnee

Kershnee

  • 2087 Posts
  • 152 Reply Likes
Try this code Littleus:

<div align="center">
<table valign="top" border="0" width="75%">
<tbody><tr><td align="center">
<table border="1" width="350">
<tbody><tr><td style="font-family: Verdana; font-weight: bold;" align="center" width="290">
CATERGORY

</td>

<td style="font-family: Verdana; font-weight: bold;" align="center" width="60">

CODE</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

0-3 Months

</td>

<td style="font-family: Verdana;" align="center">

0</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

3-6 Months

</td>

<td style="font-family: Verdana;" align="center">

3

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

6-12 Months

</td>

<td style="font-family: Verdana;" align="center">

6</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

12-18 Months

</td>

<td style="font-family: Verdana;" align="center">

12

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

18-24 Months

</td>

<td style="font-family: Verdana;" align="center">

18

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Size 2

</td>

<td style="font-family: Verdana;" align="center">

S2<br></td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Size 3<br></td>

<td style="font-family: Verdana;" align="center">

S3

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Size 4<br></td>

<td style="font-family: Verdana;" align="center">

S4</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Toys & Baby Equipment<br></td>

<td style="font-family: Verdana;" align="center">

T<br></td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Freebies<br></td>

<td style="font-family: Verdana;" align="center">

T<br></td>

</tr>
</tbody></table>
</td><td valign="top" align="center">
<table border="1" width="350">
<tbody><tr><td style="font-family: Verdana; font-weight: bold;" align="center" width="290">
SUB-CATERGORY

</td>

<td style="font-family: Verdana; font-weight: bold;" align="center" width="60">

CODE

</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

Shirts

</td>

<td style="font-family: Verdana;" align="center">

S</td>

</tr>

<tr>

<td style="font-family: Verdana;" align="center">

Pants & Skirts

</td>

<td style="font-family: Verdana;" align="center">

P</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Dresses

</td>

<td style="font-family: Verdana;" align="center">

D</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Outfits

</td>

<td style="font-family: Verdana;" align="center">O</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

PJS & Onesies

</td>

<td style="font-family: Verdana;" align="center">

PJ

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Outerwear

</td>

<td style="font-family: Verdana;" align="center">

OW

</td>

</tr>
<tr>

<td style="font-family: Verdana;" align="center">

Miscellaneous</td>

<td style="font-family: Verdana;" align="center">

M</td>

</tr>
</tbody></table>
</td>
</tr></tbody></table></div>
Photo of Sanja

Sanja, Official Rep

  • 10698 Posts
  • 495 Reply Likes
Thanks Connor & Kershnee!

Both codes worked great! I knew it was the valign thing but I just couldn't figure out the placement or the correct usage of it.

I appreciate your help!