Page 1 of 1

Add margins to a sentence or paragraph BBcode

Posted: Thu Dec 21, 2017 12:09 pm
by steven
This BBcode allows you to enter a number to set a margin for a line or paragraph. Since the HTML <p></p> command is used with this code, top and bottom padding is added as well. If you do not want a new paragraph, remove the <p></p> parameters from the code.

The margin code can be used on one line or a whole paragraph.

In this example a 100px margin was used for this line.

In the case below a 50px margin was added to the whole paragraph.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


You can wrap the margin code around lists or other codes and set a margin.

My List
  1. My first item
  2. My second item
  3. My third item
  4. My last item
BBcode Usage:

Code: Select all

[Margin={NUMBER}]{TEXT}[/Margin]
HTML Replacement:

Code: Select all

<p><div style="margin-left: {NUMBER}px";>{TEXT}</div></p>
Help line:

Code: Select all

Enter left margin in px [Margin=NUMBER]TEXT[/Margin]