Comments on CSS Techniques

Hi, here some brief comments about CSS Techniques [1]: 


1 - C6: Positioning content based on structural markup [2]:  

I suggest not to use units (like em or px) when the CSS property value is 0 (maybe somehow confusing). So, for example (Example 1):

 .item1 {
   left: 0em;
   margin: 0px;
   position: absolute;
   top: 7em;
 }

may be changed to:

 .item1 {
   left: 0;
   margin: 0;
   position: absolute;
   top: 7em;
 }



2 - C9: Using CSS to include decorative images

There's a syntax error in "Example 4: Image replacement used to enhance the visual appearance of a heading":

<style type="text/css".

must be changed to

<style type="text/css">



3 - C17: Scaling form elements which contain text [4]

A rule like the following is a quick and effective way to obtain scaling for all form elements:

input, button, textarea, select {
	font-size: 100%;
	font-family: Arial, Helvetica, sans-serif; /* <--- Same as body font-family */
}

To grant visual coherence I usually change form elements font-family to match body font-family.



4 - C20: Using relative measurements to set column widths so that lines can average 80 characters or less when the browser is resized [5]

According to CSS 2.1 specification relative units are: em, ex and px (so also pixels are relative units).To avoid any confusion I suggest  to avoid the term "relative". I understand that the right meaning of the technique can be taken from the context, but I've learned that assuming readers always make right inferences is wrong ;). 


Have a nice day,
Marco


[1] http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-TECHS/css.html  
[2] http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-TECHS/css.html#C6 
[3] http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-TECHS/css.html#C9 
[4] http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-TECHS/css.html#C17 
[5] http://www.w3.org/WAI/GL/WCAG20/WD-WCAG20-TECHS/css.html#C20 

-- 
Marco Bertoni
International Webmasters Association / The HTML Writers Guild
http://www.iwanet.org

Received on Wednesday, 3 December 2008 11:57:34 UTC