hrStyle

Summary: Add styles to an HTML hr element using %style% markup
Version: 2026-05-28
Prerequisites: Preferably PHP Version 8.5 but as low as 8.2, anything older has reached PHP "End of life" and might work, I do not support PHP version 5
Status: ready
Maintainer: --gnuzoo
License: GNU General Public License as published by the Free Software Foundation http://www.fsf.org either version 2 of the License or (at your option) any later version
Categories: Uncategorized
Users: (view / edit)
Discussion: hrStyle-Talk
Downloads: hrStyle.phpΔ

Questions answered by this recipe

Horizontal rulers are all the same and its a hassle to add 3 lines using
the 'icky spider' markup (>><<) to style the HTML <hr/> element and I dont
want to use an external CSS file.

Description

With this recipe you can set styles for you HR

Its easy to use, just put style in from of the 4 dashes.
The only thing allowed in front of the 4 dashes are styles like this:

%margin-left=0 width=20px%----
%margin-left=0 width=50px red%----
%margin-left=0 white width=70px%----
%margin-left=0 blue width=90px%----
%margin-left=0 rebeccapurple width=120px%----
%green%----
----

Screen capture of some colorful <hr> elements

Installation

Copy (right-click, save link as, ...) hrStyle.phpΔ to cookbook directory and include it in your config.php file or you farmconfig.php file.

    require_once("$FarmD/cookbook/hrStyle.php") ;

Change log / Release notes

Release 1: Version 2026-04-28 - initial Release

Comments

See discussion at hrStyle-Talk

User notes : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.