Home > Articles > Graphics & Web Design > Dreamweaver & Flash

This chapter is from the book

This chapter is from the book

Modifying Table Properties Using the Property Inspector

For precise formatting of tables, it’s essential that you become familiar with the options revealed by the Table Property inspector. Shown in Figure 4.8, this Property inspector becomes available when the table is selected (for more on selecting tables, see the previous section).

Figure 4.8 Format table attributes from within the Table Property inspector.

As you can see from the callouts in Figure 4.8, the Table Property inspector allows you to set/customize the following attributes (moving from left to right):

  • ID
  • Rows and Columns
  • Width
  • Cell Padding and Cell Spacing
  • Alignment
  • Border
  • CSS Class
  • Clear Column Widths or Heights
  • Convert Table Widths to Pixels
  • Convert Table Widths to Percent
  • Source

To demonstrate the use and functionality of these attributes and formatting options, let’s rebuild the main page (index.html) of the Vecta Corp site.

If you open the index.html file for this chapter, it’ll appear to be a blank document, but a couple of minor changes have been made. First, the title and background color have been preset for you. Second, the header_bg.gif image isn’t included. As a matter of fact, this clunky (1 pixel by 2,000 pixels) image is no longer needed; it’s being replaced altogether by a centered, cleaner design.

To begin this exercise, insert a new table into the Document window by selecting Insert, Table. When the Table dialog box opens, format the options in the table dialog box so that it contains one row, one column, has a width of 100%, contains no border, no cell padding, and no cell spacing. The conFigured Table dialog box will look like Figure 4.9.

Figure 4.9  Format the new table so that it contains one row, one column, has a width of 100%, contains no border, no cell padding, and no cell spacing.

Click OK to insert the new table into the Document window. With the table now in the Document window, you’ll notice a few details. First and the most obvious is that the table spans the entire width of the Document window. Remember, this table is set to 100%. What that means is that no matter how I stretch the Files panel group on the right, the table will always automatically adjust to accommodate the width of the Document window—as it will do in the browser window as well. Second, you’ll notice that the Table Widths Visual Aid displays the width of the table as a percentage, but just to the right of that Figure displays the current width in pixels within parentheses. This value is simply for your information and is useful to reference in case you ever need to convert the table’s percentage to a pixel value instead. Finally, you’ll notice that even though we didn’t specify a border, the table appears to contain a dotted border surrounding the perimeter of the table. This is actually a visual aid and not a border. This visual aid, which can be disabled by clicking the Visual Aids button on the Document toolbar and unchecking the Table Borders option, won’t show in the browser.

With the table selected, you can now begin modifying various attributes within the Property inspector. Let’s begin.

The Table ID

An attribute seldom used (unless you’re working with JavaScript and/or CSS), the Table ID attribute allows you to uniquely identify the table so that it can be referenced from scripting languages. This attribute is entirely optional and will have no effect on the table if left empty. We’ll use the Table ID as a simple way of identifying the tables throughout the chapter. If I say select the content table, you’ll know what table to select. If I indicate select the header table, again, you’ll know what table to select. With our existing table selected, enter the value header into the Table ID text box and press Enter (Return).

Adding and Removing Rows and Columns

As you might expect, there are numerous ways for adding and removing rows and columns after you’ve inserted a table. You could delete the table and reinsert it if you really wanted to, but there are simpler methods. For instance, to add a row, you could place your cursor within the last cell of the last row and press the Tab key. Doing this adds a new row. Alternatively, you could use the Insert Row option (press Ctrl+M/Command-M) available from the Table submenu within both the context menu, invoked by right-clicking (Control-clicking) the table, and the Modify menu. After the new row has been inserted, you can easily remove it by accessing the Delete Row option (press Ctrl+Shift+M/Command-Shift-M) from the Table submenu within either the context menu or the Modify menu. Another, more flexible, alternative for inserting rows is to use the Insert Rows or Columns dialog box available from the Table submenu in both the context menu and the Modify menu. Choosing this option opens the Insert Rows or Columns dialog box (see Figure 4.10).

Figure 4.10 Use the Insert Rows or Columns dialog box as an alternative method to inserting rows or columns within your table.

With the dialog box open, you’ll immediately notice that you can not only insert a new row below the existing row, but can also insert a new row above the existing row. Even better, you have the option of inserting new columns before or after the column where your cursor is currently focused. Try entering the number 5 within the Number of Rows text box and click OK. As you can see from Figure 4.11, the rows are added to the table.

Figure 4.11 New rows are added to the table using the Insert Rows or Columns dialog.

It’s important to note that the previous methods work only when your cursor is focused within a cell. You can change the overall count of rows and columns for the table from the Property inspector by selecting the table and changing the text box values for Rows and Cols. To return my table back to its original state, I’ll enter 1 within the Rows text box and press Enter (Return). The table will return to its original state.

Changing Table Sizes

Aside from adding and removing rows and columns, you also have the capability to change the width of the table directly from the Property inspector. You already saw how you can use the Table dialog box to initially set the width of the table (we set it to 100%); alternatively, you can set the width of the table directly within the Property inspector. Because I know that the image header.gif will reside within this table, and I know that the width of the image is 697 pixels, I’ll change the width of the table now to this number by placing my cursor within the W text box, typing 697, making sure pixels is selected from the menu, and pressing Enter. As you can see from Figure 4.12, the width of the table is affected.

Figure 4.12 Change the width of the table to 697 pixels from within the Property inspector.

As your web pages become increasingly complex, you’ll begin to realize that keeping track of your table’s dimensions can get out of hand. If you ever feel like starting over, you can clear all widths and heights from both the table and cells within the table using the Clear All Widths and Clear All Heights options. You can access these options in one of three ways: First, you can choose these options from the Table Widths Visual Aid’s list, as shown in Figure 4.13.

Figure 4.13 Select the Clear All Widths or Clear All Heights options to clear table or cell widths, respectively.

Second, you can clear column widths and column heights by clicking the Clear Column Widths and Clear Column Heights buttons located just below and to the right of the Table ID field on the Property inspector. Finally, you can perform the same operation by choosing the Clear Cell Heights and Clear Cell Widths options located in the Modify, Table submenu. Whichever method you choose results in the same action: either the height (for cells) or width is removed.

Modifying Cell Padding and Cell Spacing

Although it might not seem like it, the structure of our new Vecta Corp page is coming along nicely. As I’m sure you can tell, we’re outlining the various properties outlined by the Table Property inspector while at the same time designing the header for our table-based page. And while there’s still a lot to be done, let’s move forward by adding the main header image to the cell within the header table. This can be done by locating the header.gif image within the Images folder of our defined site, selecting it, and dragging it over and into our table’s cell. The result will appear similar to Figure 4.14.

Figure 4.14 Drag the header graphic into the table’s cell to round out the heading for our web page.

Now that you have the header of the page squared away, it’s time to build the bottom portion of the site. Yes, we could insert the contents of home.txt (located within the Assets folder) directly underneath the existing table; unfortunately, doing this would cause the text to align flush against the edge of the Document window as our margins are currently set to 0 pixels. Although we could fix this by adding a margin width, doing that would cause our table at the top of the page to shift to the right to compensate. Instead, we could create a table below our existing table and adjust its cell spacing or cell padding to make up for the necessary spacing. To do this, we’ll begin by adding a new table. Begin the process by following these steps:

  1. Place your cursor just to the right of the header table.
  2. Choose Insert, Table. The Table dialog box appears.
  3. Give your new table 2 rows, 2 columns, a width of 697 pixels, a border thickness of 0, a cell padding of 0, and a cell spacing of 4.
  4. Click OK. Your new table will be inserted into the Document window, below the header table, and will look similar to Figure 4.15.
  5. Figure 4.15 The new table is inserted and includes cell spacing to protect the content from the left edge of the page.

  6. Assign your table the ID content within the Table ID text box in the Property inspector (shown in Figure 4.15).

Now that the table is firmly in place, you can see that the cell spacing is available. Unlike the header table, which doesn’t contain spacing around the edges of the table, our content table contains spacing around the table and between cells. This will become more obvious later, when you insert text into a cell.

Table Alignment

Now that we have both a header and a content table within our page, let’s finish off the table structure by aligning both tables to the center of the page. To do this, select each table and then choose the option Center from the Align menu in the Property inspector so that each of your two tables is center-aligned on the page, similar to Figure 4.16.

Figure 4.16 Select each table and center align them on the page.

It’s important to note that this option aligns only the table on the page, not the content within the table. To align the content within the table, you’ll still need to select any content that you add within the table and choose the center align option from the Text Property inspector.

Working with Table Borders

There are a couple of methods for adding borders to your existing tables, but none more obvious than the Border text box option located within the Property inspector. Selecting a table and adding a value here (other than 0) creates a traditional, ordinary looking border. Nothing fancy here! We’ll discuss a second option for adding borders in CSS in the next chapter.

Converting Table Widths to a Percentage or Pixels

Every now and then you might find the need to convert an existing table that was created using pixels into a percentage value or vice versa. For instance, our content table is displayed at the bottom of the page and has a fixed width of 697 pixels. Looking at the table and its width within the page, it appears to take up roughly 80% of the page. If I like this width, but prefer the width to be expressed in percentages as opposed to pixels, I can easily perform a conversion with a simple click of a button. To do this, I can select the table and choose Modify, Table, Convert Widths to Percent (shown in Figure 4.17).

Figure 4.17 Convert table widths to percentages.

Although you won’t notice a significant difference initially, the Table Widths Visual Aid does, in fact, display the table width as a percentage followed by the pixel width within the parentheses. Just below that value is the width of the cell expressed as a percentage, again followed by the pixel width in parentheses.

Other options exist from the same menu, including Convert Widths to Percent, Convert Heights to Pixels, and Convert Heights to Percent. Furthermore, you can access these options directly from the Property inspector by choosing the icons located to the bottom-left of the Property inspector, just underneath the Table ID text box.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020