CSS is the 'official' method to position page elements and tables should only be used to hold tabular data. =========================================== The word ‘cascading’ in CSS describes a cascading mechanism; that is to say that the CSS code on the page itself will override the CSS code in a separate linked file. And subsequently, CSS declared ‘inline’ on the tag itself would override all other CSS. =========================================== http://www.pmob.co.uk/faqcss/index.htm If your link colours aren't working and you have them defined in your stylesheet then you may have inserted them in the wrong order. Due to the Cascading nature of style sheets, if the link properties are not stated in the following order in your style sheet then the result may not be what you expect. This is the correct order: 1 a:link 2 a:visited 3 a:hover 4 a:active You're best off putting your styles in the order "link-visited-hover-active", or "LVHA" for short. suppose you want your hover effect to apply only to unvisited links, whereas visited links should get no hover. No problem! Just put them in the order link-hover-visited-active, or even link-hover-active-visited if you want visited links to get no active styles, either. http://meyerweb.com/eric/css/link-specificity.html =========================================== background-color: transparent; =========================================== Note that when re-setting padding and margin to zero you will lose the bullets on lists because some browsers use a default left padding in order to show the bullet and some use a default left margin instead. Therefore I always include a 16px left margin for the ul so that the bullet will show and browsers will be consistent. There is one more side effect of the reset and that is in mozilla browers where input buttons lose their depressed effect when pushed once you reduce the padding and margins. It's a small issue but one you should be aware of. =========================================== Note that you could use the shorthand for the margins which will shorten the code down considerably. The shorthand is like this: margin:5px auto 5px auto That would effectively refer to the margins in this order:margin:top right bottom left In fact it can be shortened even further by using just two measurements. margin:5px auto When you use just two measurements the the first one refers to the top and bottom margins and the second one refers to the left and right margins. There is on fact another shorthand option and that would involve using three measurements e.g. margin: 5px auto 5px. When supplied in that order the first measurement applies to the top margin and the econd measurement applies to left and right margins and the third measurement applies to bottom margin. (The shorthand for padding is the same as above.) One thing to note when using shorthand is that any properties you don't specify revert back to their default values which may over-ride styles you have already set. =========================================== padding: 0 0 20px 235px; top right bottom left =========================================== The box model consists of: padding, margins, borders and the actual content. This allows us to place a border around elements and space elements in relation to other elements. From the inside out it is ordered like so: content -> padding -> border -> margin =========================================== POTENTIAL FONT PRINTING ISSUES We shouldn't use Points either unless the output is to the printer. Points are a fixed size that will not scale and are ideal for printed output. The same goes for in cm and mm as these are sizes that won't scale but are ideal for printing or for fixed size content. Therefore we are left with % (percentage) and ems. Percentages as explained by the W3C are as follows: "A percentage value specifies an absolute font size relative to the parent element's font size. Use of percentage values, or values in 'em's, leads to more robust and cascadable style sheets." An em is the equivalent to the letter M in the parentfont-size and ex's are equivalent to the small letter x of the default font size. Both of these can be used to set size that is relative to the standard. Em and Ex sizes are based on a size defined with the CSS body style. For instance, you'll see in the style sheet for this page body { font-size: small}. That means that 1 em is equal to the size "small." So if a normal size is 1 em or 100% we can set text that is twice the size by specifying 2em or 200%. In this way the size will be relative to the screen size and font size that is used and therefore should be consistent among compliant browsers. =========================================== thanks to cascading style sheets, it is possible to give modern web browsers a "hint" to help them put page breaks in the right places when printing out web pages. Here is an example:

This will force a page break when printing, before the start of this particular

element. Not all web browsers support CSS perfectly. If you must have absolute layout control and are primarily concerned with printing, consider using PDF rather than HTML. =========================================== The main parameters for the types properties are: font-size: 9 | 10 | 12 | 14 | 16 | 18 | 24 | 36 | x-large | xx-large | x-small | xx-small | small | medium | large | smaller font-style: italic | normal | oblique line-height: normal | (size) font-variant: normal | small-caps font-weight: normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900. text-transform: capitalize | uppercase | lowercase =========================================== The parameters for the background are: background-repeat: no-repeat | repeat | repeat-x | repeat-y. background-attachment: fixed | scrolled. background-position: left | center | right | top | center | bottom =========================================== The same thing can be applied to the other list objects, such as DD, DT, LI, OL and UL. The parameters which can be defined with the list-style properties are: list-style-type: disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none. list-style-image: (URL) | none list-style-position inside | outside =========================================== The options for the styles are: border-pos-style: none | dotted | dashed | solid | double | groove | ridge | inset | outset border-pos-width: thin | medium | thick | auto | (value) An example of using a mixture of border styles and colors is:

Test

http://www.soc.napier.ac.uk/~bill/css_linestyles.htm =========================================== The cursor property can be set to: cursor: hand | crosshair | text | wait | default | help | e-resize | n-resize | s-resize | w-resize | ne-resize | nw-resize | se-resize | sw-resize | auto http://www.soc.napier.ac.uk/~bill/css_cursor.htm Lots of cursor examples: http://www.killersites.com/HTML_CODES/ =========================================== CSS allows text layout rules that are used in the publishing industry, and can use either rela-tive or absolute units. The relative units are defined in terms of another unit, and are: em Height of font ex Height of the letter 'm' px Pixels % Percentage and the absolute units are: in Inches, where 1 inch is 2.54 cm cm Centimeters. mm Millimeters. pt Points, where 1 point is 1/72 inch pc Picas, where 1 pica is 12 points Relative length units are useful when objects are scaled, whereas absolute are typically used when the actual dimensions of an object are know. http://www.soc.napier.ac.uk/~bill/css_units.htm =========================================== It is important that the style declarations/rules be in the right order: "link-visited-hover-active", otherwise it may break it in some browsers. A good way to remember this order is "LoVeHAte" ===========================================

The Paragraph tag is used to mark parts of the pages as being 'paragraphs', simple enough. Paragraph tags are what they call a 'block element'; that means that it acts like a block where a space is automatically inserted before and after each

tag pair. ===========================================