Showing posts with label css. Show all posts
Showing posts with label css. Show all posts

08 May 2011

CSS Font-Size: em vs. px vs. pt vs. percent

Posted from Diigo. The rest of my favorite links are here.

Very well explained comparison and example use of px, pt, em, percent units used in CSS web design. The conclusion is that a combination of em and percent is best suitable for web documents today. You should put that into practice.

07 May 2011

Stying HTML forms with CSS

There are two important tags for form styling: <fieldset> and <legend>. To see some examples about styling these two tags, check this link.

In addition, if you want to have CSS centering layout, here is a common methodology for your own reference. 

22 October 2010

jQuery syntax for selecting HTML elements

The jQuery syntax is tailor made for selecting HTML elements and perform some action on the element(s).

Basic syntax is: $(selector).action()

  • dollar sign to define jQuery
  • (selector) to "query (or find)" HTML elements
  • jQuery action() to be performed on the element(s)

Examples:

$(this).hide() - hides current element

$("p").hide() - hides all paragraphs

$("p.test").hide() - hides all paragraphs with class="test"

$("#test").hide() - hides the element with id="test"


P.S. jQuery uses a combination of XPath and CSS selector syntax.

20 October 2010

CSS selectors

Posted from Diigo. The rest of my favorite links are here.

Best CSS reference is from W3C!