CSS Tips

This page provides some CSS tips based on questions we’ve been sent. If you have a CSS question,┬ájust email us.

Embedding Fonts

There are thousands of fonts, so why limit yourself to Arial and Times? If you want to use a less common font, you can embed it into your document to make it available to your users. An example is below:

@font-face {
font-family:”sample EOT”;
src: url(sample.eot);
@font-face {
font-family: sample;
src: url(‘sample.ttf’) format(“truetype”);

p { font-family:”sample EOT”, sample; }

You must write the @font-face rule twice as shown in the above example. This tip will work with any HTML or XHTML document, including Flare and RoboHelp topics.

Centering a Table

You can center a table by setting its margin-left and margin-right properties. The secret is to set their values to “auto” instead of a pixel or percentage value:

table {
margin-left: auto;
margin-right: auto;

Flare-specific CSS Tips

Check out our Flare tips.

CSS to the Point

Want to learn CSS like a pro? CSS to the Point provides answers to over 150 CSS questions. Each answer includes a description of the solution, a graphical example, and sample code that has been tested in Internet Explorer, Firefox, Opera and Safari. Tell me more…