appy with Step 1? Then let's continue to step 2 and change the column widths of your table.

Step 2

This was how your table looked in Step 1:

.

Now we'll start adding the attributes to change the column widths.

In the first section between each of the <tr></tr> tags, copy and paste the following code and insert it between the <td and > tag (make sure you include a space after <td):

style="border: 1px solid #000000; background-color: #ffffff; width: 560px; vertical-align: middle: text-align: center; line-height: 0px;" rel="border: 1px solid #000000; background-color: #ffffff; width: 560px; vertical-align: middle: text-align: center; line-height: 0px;" colspan="4"

This will automatically merge the four columns into one to accommodate your heading..

Now copy and paste the following code directly under the <tr> tag in the second section of code between the <td and > tag:

style="border: 1px solid #000000; background-color: #ffffff; width: 280px; line-height: 0px; text-align: center; vertical-align: center;" colspan="2"

style="border: 1px solid #000000; background-color: #ffffff; width: 280px; line-height: 0px; text-align: center; vertical-align: center;" colspan="2"

This will automatically merge two columns into one to accommodate your sub heads.

The final step in creating you basic table structure is to copy and paste the following code in each of the last two sections between the <td and > tag:

style="border: 1px solid #000000; background-color: #ffffff; width: 140px; text-align: center; vertical-align: middle; line-height: 0pt;"

In the last section of code you will need to change center; to left;

Preview your site and you should now see this:

Happy with it? Save as draft and continue to step 3.


Join the Discussion
Write something…
Recent messages
JeffBoivin Premium
Great great tutorial ! I bookmarked for futur use, thanks for sharing your knowledge, Cheers, Jeff
Reply
Ventures2000 Premium
Just starred it for when I'm ready, thanks
Reply
Harrysastar2 Premium
Thanks Robert, whenever you're ready give me a shout if your need any help.
Reply
Mike-Writes Premium
Thanks for the excellent tutorial, Harry.
Reply
Harrysastar2 Premium
Hi Mike, thanks for the comment, hope you find the training useful.
Reply
Mark Tait Premium
Hi Harry - very comprehensive, well done on a great tutorial.

Tables baffle a lot of people - I've seen a lot of questions here about them - and without a plugin, going into HTML for some people can be very daunting.You've clearly explained tables in a very easy way to understand.

If I could add one thing, where you have "width: 123px;" - that can be changed to a percentage - so your table becomes a little bit responsive. eg. "width: 40%;" - then the table will adapt as much as possible to the size of screen it's being viewed on.

All the best, Mark
Reply
Harrysastar2 Premium
Thanks Mark, much appreciated.
Reply
jvranjes Premium
Mark, I started using tables after one of your replies to my question, where you gave the basic structure, and I have them now in every post. Very useful for comparison.
Reply
Mark Tait Premium
Cheers Jovo - that's very humbling!

All the best, Mark
Reply
jvranjes Premium
To you too.
Reply
jvranjes Premium
This is a great training. I was thinking of doing it myself, but you did it far better than I could. Many thanks.
Reply
Harrysastar2 Premium
Hi Jovo,thanks for the reply, hope you find it useful.
Reply
Top