12.09.2015 Views

Boot Camp

Web Authoring Boot Camp - StudioBast

Web Authoring Boot Camp - StudioBast

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Keep in mind that<br />

Styling Code, Part 1<br />

• Inline styles can only be used inside of a style=”” attribute for another tag, such as<br />

.<br />

• ALL rules need to have the attribute/value paired style shown after style=” and<br />

must close with another “ (quote marks)<br />

• All measurements need a qualifier - px, %, etc.<br />

• You cannot use text, image or link styles for table, table row, or table data cell<br />

tags.<br />

• You cannot use table, table row, and table data cell styles for text, image or link<br />

styles<br />

CS Measurements<br />

• em: The height of the element’s font.<br />

• ex: The height of the letter ‘x’ in the element’s font.<br />

• px: pixel<br />

• mm:millimeter<br />

• cm: centimeter<br />

• pt : point (1/72 inch)<br />

• pc: pica (12 points = 1/6 inch)<br />

• in: inch<br />

• %: percentage<br />

Note that:<br />

• The absolute units mm, cm, pt, pc and in do not work well on screen and cause<br />

problems in many older browsers. It is safest to only use them for print media.<br />

Even in print media they may interact badly with users’ preferences.<br />

• The relative units em, ex and px do not specify a fixed length. Instead they scale<br />

relative to some other quantity. In the case of em and ex they scale relative to the<br />

font size of some element.<br />

• The flexible unit percent lets the page interact gracefully with visitor’s preferences.<br />

147

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!