Jump to content

Template:OSM Location map/cssline

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by RobinLeicester (talk | contribs) at 15:59, 2 March 2024 (allow top border plus gap-size using 'double'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Creates a CSS div to draw a line between two points (x1,y1) and (x2,y2).

Other parameters are outline-width, outline-style and shape-outline which provide the line-width,css line style and line-color.

It works by calculating the centre-point, transform-angle and line-length needed and applies them to border-bottom. (Maths comes with thanks to ES.)