Price Tag Programming Help

Line Spacing

See CSS Forum: CSS and line-height between paragraphs.


Fonts

font-style can be normal or italic or oblique,
but the last two look very alike, so just use normal and italic.

Must have at least <style>...<style> otherwise cannot access sheet 0,
and must have at least one style entry, otherwise get INDEX_SIZE_ERR.


position:

static Default. Elements render in order, as they appear in the document flow.
absolute The element is positioned relative to its most previous positioned (not static) ancestor element.
fixed The element is positioned relative to the browser window.
relative The element is positioned relative to its normal position,
e.g. "left:20" will add 20 pixels to the element's LEFT position.
inherit The value of the position property is inherited from the parent element.

With absolute and possibly others:
Cannot get xxx.style.top directly (it is a string value). Set it by e.g. xxx.style.top = String( x ) +"px";
xxx.style.top.replace(/px/, '') *1 appears to return 0 until xxx.style.top is set by program.
xxx.offsetTop returns the top value as a number.
pic.style.top = String( y -u ) +"px"; xxx.style.pixelTop starts off at zero regardless of style.top setting. Equals the change in top.
xxx.style.posTop is similar, but is a floating point value, and might not always be in pixels.

Negative margins - see The Definitive Guide to Using Negative Margins.
Left and top negative margins pull the element in that direction.
right and bottom negative margins pull subsequent elements into this one.



double click

Double clicking fails to run the ondblclick function in Chrome and Safari.
- Single clicking works OK.


input type="file" format

N.B. css seems not to action type=...

See quirksmode: Styling an input type="file"
for fancy input box which is similar across browsers.
See stackoverflow: Styling an input type=“file” button
which also has a fix for the onchange not firing (in IE) till the field blurs.


Changing style statements by Javascript

See http://www.javascriptkit.com/dhtmltutors/externalcss2.shtml.


Saving

Saving the web page does not save the text or style changes.
Ctrl A to select all, and Ctrl C copies all the visible text to the scratchpad,
including what is out of sight in textareas, but seems to miss values in input tags.


JavaScript classes

See phpied.com/3-ways-to-define-a-javascript-class.


JavaScript variables scope

See Microsoft: Internat Explorer Dev Center: Variable Scope (JavaScript).