Browsed by
Month: June 2008

CSS font shorthand rule

CSS font shorthand rule

When styling fonts with CSS you may be doing this:font-size: 1em;line-height: 1.5em;font-weight: bold;font-style: italic;font-variant: small-caps;font-family: verdana,serif; There’s no need though as you can use this CSS shorthand property:font: 1em/1.5em bold italic small-caps verdana,serif Much better! Just a couple of words of warning: This CSS shorthand version will only work if you’re specifying both the font-size and the font-family. Also, if you don’t specify the font-weight, font-style, or font-varient then these values will automatically default to a value of normal, so…

Read More Read More

Why tables for layout is stupid:

Why tables for layout is stupid:

Tables existed in HTML for one reason: To display tabular data. But then border=”0″ made it possible for designers to have a grid upon which to lay out images and text. Still the most dominant means of designing visually rich Web sites, the use of tables is now actually interfering with building a better, more accessible, flexible, and functional Web. Find out where the problems stem from, and learn solutions to create transitional or completely table-less layout. The problem with…

Read More Read More

IE and width & height issues

IE and width & height issues

IE has a rather strange way of doing things. It doesn’t understand the min-width and min-height commands, but instead interprets width and height as min-width and min-height – go figure! This can cause problems, because we may need boxes to be resizable should more text need to go in them or should the user resize text. If we only use the width and height commands on a box then non-IE browsers won’t allow the box to resize. If we only…

Read More Read More

Minimum width for a page

Minimum width for a page

A very handy CSS command that exists is the min-width command, whereby you can specify a minimum width for any element. This can be particularly useful for specifying a minimum width for a page. Unfortunately, IE doesn’t understand this command, so we’ll need to come up with a new way of making this work in this browser. First, we’ll insert a under the tag, as we can’t assign a minimum width to the : Next we create our CSS commands,…

Read More Read More

ANSI character set and equivalent Unicode and HTML characters

ANSI character set and equivalent Unicode and HTML characters

The characters that appear in the first column of the following table are generated from Unicode numeric character references, and so they should appear correctly in any Web browser that supports Unicode and that has suitable fonts available, regardless of the operating system. Character ANSINumber UnicodeNumber ANSIHex UnicodeHex HTML 4.0Entity Unicode Name Unicode Range ‘ ‘ 32 32 0x20 U+0020 space Basic Latin ! 33 33 0x21 U+0021 exclamation mark Basic Latin “ 34 34 0x22 U+0022 " quotation mark…

Read More Read More

CSS Block and inline level elements

CSS Block and inline level elements

Nearly all HTML elements are either block or inline elements. The characteristics of block elements include: begin on a new line Height, line-height and top and bottom margins can be manipulated defaults to 100% of their containing element, unless a width is specified Examples of block elements include , , , , and . Inline elements on the other hand have the opposite characteristics: Begin on the same line Height, line-height and top and bottom margins can’t be changed Width…

Read More Read More