Actions

J2.5

Difference between revisions of "Add a table"

From Joomla! Documentation

m (navigational template added adding some more information, moving other, still needs to be improved more)
m (update)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{version/tutor|1.6,1.7,2.5}}{{:Getting_Started_Page_Index/2.5}}{{:GSheader16}}
+
{{version/tutor|2.5}}{{:Getting_Started_Page_Index/2.5}}
 
The aim of this document is to show how a table can be added to an Article.
 
The aim of this document is to show how a table can be added to an Article.
  
Line 12: Line 12:
 
*There is no icon for adding a table on the simplest editors, so you cannot try this using the simple editor in the sample data in localhost. You could, if you have the experience, add a table there using the source code, HTML.
 
*There is no icon for adding a table on the simplest editors, so you cannot try this using the simple editor in the sample data in localhost. You could, if you have the experience, add a table there using the source code, HTML.
  
<div style="border:thin solid green; margin-left:100px; background: #f5f5f5; width: 80%; padding:5px;">
+
<div class="large-10 panel large-offset-1 radius" style="border:1px solid green;background:#f5f5f5; margin-top:1em;">
 
'''Using the HTML source code'''
 
'''Using the HTML source code'''
 
If you know enough HTML, you may find it easier to get the layout to your liking using the code. If you are a novice - don't! - or at least not yet.
 
If you know enough HTML, you may find it easier to get the layout to your liking using the code. If you are a novice - don't! - or at least not yet.
Line 23: Line 23:
 
</div>
 
</div>
  
'''The best tip''' - keep it simple to start with.
+
{{tip|title=The best tip|Keep it simple to start with.}}
  
 
== Create a table ==
 
== Create a table ==
Line 55: Line 55:
 
You can copy tables from spreadsheets and word processors.
 
You can copy tables from spreadsheets and word processors.
 
*Experiment with doing this to start with
 
*Experiment with doing this to start with
::Have a simple table in a spreadsheet or word processor
+
:#Have a simple table in a spreadsheet or word processor
::Copy it
+
:#Copy it
::Open the article to be edited
+
:#Open the article to be edited
::Paste it in
+
:#Paste it in
  
 
The layout may not be ideal. You can edit the table using the tools on the tool bar.
 
The layout may not be ideal. You can edit the table using the tools on the tool bar.
Line 66: Line 66:
 
Getting a table to look as you wish usually is a case of trial and error. (While you are editing you will probably need to use the undo icon (little round arrow) -  (or control Z on your keyboard)
 
Getting a table to look as you wish usually is a case of trial and error. (While you are editing you will probably need to use the undo icon (little round arrow) -  (or control Z on your keyboard)
 
====Editing the table's properties====
 
====Editing the table's properties====
::Place the mouse pointer in the table to Highlight it
+
:#Place the mouse pointer in the table to Highlight it
::Select the Insert/Edit icon (which annoyingly just says Insert!)
+
:#Select the Insert/Edit icon (which annoyingly just says Insert!)
::Make changes to such things as border widths.
+
:#Make changes to such things as border widths.
::Look under the Advanced Tab. You can change the border and background colours here.
+
:#Look under the Advanced Tab. You can change the border and background colours here.
  
 
==== Change rows, columns or cells ====
 
==== Change rows, columns or cells ====
 
There are icons on the editor for doing most of the formatting you may need.
 
There are icons on the editor for doing most of the formatting you may need.
 
You can make text appear to the right, centre or left or to the top, bottom or centre of the cell - just as you can using a word processor
 
You can make text appear to the right, centre or left or to the top, bottom or centre of the cell - just as you can using a word processor
::Position the cursor in the row or cell you wish to change
+
:#Position the cursor in the row or cell you wish to change
::Click on the "table row properties" or "table cell properties" icon as appropriate
+
:#Click on the "table row properties" or "table cell properties" icon as appropriate
::Change the settings in the dialogue box
+
:#Change the settings in the dialogue box
::Click update
+
:#Click update
  
 
To add a row
 
To add a row
::Position the cursor in one of the cells
+
:#Position the cursor in one of the cells
::Click either the "insert row before" icon or the "insert row after" icon as appropriate
+
:#Click either the "insert row before" icon or the "insert row after" icon as appropriate
 
To delete a row
 
To delete a row
::Position the cursor in one of the cells
+
:#Position the cursor in one of the cells
::Click the "delete row" icon
+
:#Click the "delete row" icon
 
To add a column
 
To add a column
::Position the cursor in one of the cells
+
:#Position the cursor in one of the cells
::Click either the "insert column before" icon or the "insert column after" icon as appropriate
+
:#Click either the "insert column before" icon or the "insert column after" icon as appropriate
 
To delete a column
 
To delete a column
::Position the cursor in one of the cells
+
:#Position the cursor in one of the cells
::Click the "delete column" button
+
:#Click the "delete column" button
 
To merge cells
 
To merge cells
::Highlight the cells to be merged using the mouse
+
:#Highlight the cells to be merged using the mouse
::Click the "merge cells" button
+
:#Click the "merge cells" button
 
To split cells
 
To split cells
::Highlight the cell to be unmerged
+
:#Highlight the cell to be unmerged
::Click the "split merged table cells" button
+
:#Click the "split merged table cells" button
  
 
==Further information==
 
==Further information==
  
:*http://docs.joomla.org/Inserting_a_table_into_an_Article
+
*[[Inserting a table into an Article]]
  
 
----[[User:LornaS|Lorna Scammell]] March 2011
 
----[[User:LornaS|Lorna Scammell]] March 2011

Latest revision as of 13:45, 22 May 2014

The aim of this document is to show how a table can be added to an Article.

Who is it written for?

  • Everyone
But tables can be tricky.
Adding a table may seem cumbersome if you are used to a word processor or spreadsheet. It uses code (HTML) behind the scenes and is less flexible than a word processor.

What's a table?

A table is intended for presenting tabular information.

  • Some people use them to help layout pages, especially those with illustrations.
  • There is no icon for adding a table on the simplest editors, so you cannot try this using the simple editor in the sample data in localhost. You could, if you have the experience, add a table there using the source code, HTML.

Using the HTML source code If you know enough HTML, you may find it easier to get the layout to your liking using the code. If you are a novice - don't! - or at least not yet.

To see the HTML source code - click the Edit code icon EditCode.png.
If you are using the simple editor, use the Toggle editor button at the bottom of the Editor screen. GSToggle.png. You can toggle from HTML to the normal editing screen by pressing the button again.

These change the editor display to allow you to edit the HTML source code.

Tip-icon.png
The best tip

Keep it simple to start with.

Create a table

Beware - Do not insert a table at the very top line of a page because it upsets the layout and pushes the table off screen to the right of the page!

Before you create a table:-

Write some text (or press Enter) on the first line of the article

Now you can do it:-

Place the cursor where you want the table to be located in the article
Click the create table icon

A dialog box appears to enable you to define some of the characteristics of the table.

The create table dialgue box in the JCE editor

In the dialogue box:-

Define the number of horizontal rows and vertical columns
Enter a Width (This will present the table in the editor in a helpful way, so that you can see the cells. If you do not enter a width - the cells are squashed together and are hard to populate.
Fine tune the rest - such as adding a 1 for the thickness of the borders. (A zero does not show any borders)
Click create

If you have entered a width, the result on the screen is an empty table. Otherwise the rows and columns are squashed together and only expand when you add text or data.

Look at the icons along the top of the editor - those that allow you to do things to tables will have become active.

A table with two columns and two rows. It also has a border.

Copying a table from a word processor

You can copy tables from spreadsheets and word processors.

  • Experiment with doing this to start with
  1. Have a simple table in a spreadsheet or word processor
  2. Copy it
  3. Open the article to be edited
  4. Paste it in

The layout may not be ideal. You can edit the table using the tools on the tool bar. If you have the experience, you can edit the HTML source code in order to get a better layout.

Editing tables

Getting a table to look as you wish usually is a case of trial and error. (While you are editing you will probably need to use the undo icon (little round arrow) - (or control Z on your keyboard)

Editing the table's properties

  1. Place the mouse pointer in the table to Highlight it
  2. Select the Insert/Edit icon (which annoyingly just says Insert!)
  3. Make changes to such things as border widths.
  4. Look under the Advanced Tab. You can change the border and background colours here.

Change rows, columns or cells

There are icons on the editor for doing most of the formatting you may need. You can make text appear to the right, centre or left or to the top, bottom or centre of the cell - just as you can using a word processor

  1. Position the cursor in the row or cell you wish to change
  2. Click on the "table row properties" or "table cell properties" icon as appropriate
  3. Change the settings in the dialogue box
  4. Click update

To add a row

  1. Position the cursor in one of the cells
  2. Click either the "insert row before" icon or the "insert row after" icon as appropriate

To delete a row

  1. Position the cursor in one of the cells
  2. Click the "delete row" icon

To add a column

  1. Position the cursor in one of the cells
  2. Click either the "insert column before" icon or the "insert column after" icon as appropriate

To delete a column

  1. Position the cursor in one of the cells
  2. Click the "delete column" button

To merge cells

  1. Highlight the cells to be merged using the mouse
  2. Click the "merge cells" button

To split cells

  1. Highlight the cell to be unmerged
  2. Click the "split merged table cells" button

Further information


Lorna Scammell March 2011