[Ma-linux] CSS width
Johnson, Steve (NIH/OD/ORS) [E]
johnsons at vrp.ncrr.nih.gov
Mon Apr 2 15:49:10 EDT 2007
>> sounds like you want to use margin
The concern has been to use the highest level element (as declared in the HTML DTD/schema tree) that allows setting width.
<P> { width:Xcm } works but is like scattering <pre> </pre> throughout the document for turning on/off white-space.
<BODY> which is high in the tree doesn't set width although I believe the standard says it should
<DIV> { width:9in }
works and it is not misusing the element to just wrap all of the document below <BODY>
Those W3C CSS standards can be disgusting to read.** What is commendable is the use of flow layout.
That means the graphics algorithm proceeds line by line.
And that is how I intend to organize my own code for painting the screen, with named variables for each line to hard code vertical height, and then progressive calculation of horizontal width per line for the elements that align on that line.
Ad hoc vertical and horizontally positioning for each element as it gets added becomes spaghetti code.
I tried wrapping everything below <BODY> in a <TABLE> but immediately the <TD> has to be added, so that was not looking real parsimonious.
** You know it isn't just research on graphics algorithms (linear algebra!) but politics is involved, hangover/fallout from the browser wars. The methology has to include politics - so falling into the gravity hole of an irrational dispute might well be anticipated, and you'll be asking yourself WHY.
More information about the Ma-linux
mailing list