The Div element is the generic container for flow content.

Usage

Simple example of usage Div element with fluent interface.

use function Thermage\div;
use function Thermage\render;

// ...

render (
  div('Stay RAD!')
    ->pl5()
    ->colorGreen()
    ->bgPurple()
    ->bold()
);

Simple example of usage Div element with magic classes pipeline.

use function Thermage\div;
use function Thermage\render;

// ...

render (
  div('Stay RAD!', 'pl-5 color-green bg-purple bold')
);
Terminal
$ php thermage.php
Stay RAD!

Simple example of usage Div element as container for nested Div elements.

use function Thermage\div;
use function Thermage\render;

// ...

render (
  div(
    div('Stay', 'pl-5 color-green bg-purple bold').
    div('RAD!', 'pl-5 color-green bg-purple bold')
  )->clearfix()
);
Terminal
$ php thermage.php
Stay RAD!
Stay RAD!

Methods

bg Set Div element background color style.
blink Set Div element blink style.
bold Set Div element bold style.
border Set Div element border style.
borderColor Set Div element border color style.
clearfix Force Div element to self-clear its children block elements linebreaks.
color Set Div element text color style.
d Set Div element display style.
dim Set Div element dim style.
getShortcodes Get Div element shortcodes instance.
getTheme Get Div element theme.
getValue Get Div element value.
h Set Div element height.
invisible Set Div element invisible style.
italic Set Div element italic style.
m Set Div margin style.
mb Set Div margin bottom style.
ml Set Div margin left style.
mr Set Div margin right style.
mt Set Div margin top style.
mx Set Div margin x style.
my Set Div margin y style.
p Set Div padding style.
pb Set Div padding bottom style.
pl Set Div padding left style.
pr Set Div padding right style.
pt Set Div padding top style.
px Set Div padding x style.
py Set Div padding y style.
render Render Div element.
reverse Set Div element reverse property.
setShortcodes Set Div element shortcodes instance.
setTheme Set Div element theme instance.
strikethrough Set Div element strikethrough style.
textAlign Set Div element text align.
textAlignVertical Set Div element text align vertical.
textOverflow Set Div element text overflow.
underline Set Div element underline style.
value Set Div element value.
w Set Div element width.