Supported by :   My Law Forms Ltd. - Deed polls and Tenancy Agreements

You are currently browsing the archives for the XHTML tips category.

CSS Tip: CSS Equivalent to CELLSPACING=0

When using the TABLE tag, there are two attributes that are commonly added; cellspacing and cellpadding. For padding, there is an obvious match with the CSS definition padding. Indeed the attribute for padding-top, padding-bottom, padding-left and padding-right all behave as expected. However there is no directly corresponding property for cellspacing. One might assume that the [...]

CSS SHOUTING! – changing text case with CSS.

Ever had to wade through pages of text on a website to amend the appearance of titles or paragraph headings, to make sure they all look consistent? It can be no fun, especially if you have a site which has content added by multiple authors, all with slightly different preferences in typing. Should text be: [...]

CSS Tip – Scrollable DIVs; using overflow, overflow-x and overflow-y

An alternative to FRAMES and IFRAMES within a XHTML document where page layout is fixed, but content needs to be within a scrollable area, is to use a DIV and set the CSS attribute ‘overflow’. This is relatively straight forward to do and works in all modern browsers. In the event that CSS is disabled [...]

CSS Basics – CSS color / colour codes

Black text on a white background can get kind of boring. It looks a little old-school too. Here is how to spice up your site with a little color. There are several color values that you can use Three digit hex Six digit hex Integer Float

CSS basics – font-weight and font-style

The appearance of text can be further controlled on webpages with the font-style and font-weight properties which provide the ability to italicize and bold text. The use of these definitions is a replacement to the deprecated tag <b> and <i>

CSS Basics – font definitions

Since font tags are deprecated, CSS should now be used to specify document fonts. There are several properties available of which, the most commonly used are the font-family and font-size. eg. font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px;

CSS Basics – Structure of CSS style definitions.

The basic building blocks of CSS are rule sets. Each rule set is comprised of a selector and a declaration block. Each declaration block has zero or more declarations, or styles. Here is a basic rule set: p { background-color:#ffcc00; font-size:120% }

CSS Basics – How to comment CSS style definitions.

One important practice when creating Cascading Style Sheets (CSS) is to include comprehensive comments in the files. This will help to keep things organized and well documented, which is priceless when it comes to maintaining a site for several years, and avoiding future frustration! This is the basic structure: /* your comment here */

CSS Basics – Where to put the style definitions.

Fundamental to XHTML is the concept of separating presentational elements from structural elements. This is achieved by the use of Cascading Style Sheets (CSS). CSS can be included in documents in several ways; inline, embedded, and external. It is not recommended to use the inline method for styling documents because it defeats the purpose of [...]

XHTML Basics: Accessibility for tables; captions and summaries

If you want to create great tables that are understandable in alternative browsers, such as text-only and voice browsers, you’ll want to include table headers. Our accessibility tweaks don’t stop there though. Two more elements that will make your tables more usable and informative are captions and summaries.