Add margins to a sentence or paragraph BBcode
Posted: Thu Dec 21, 2017 12:09 pm
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 the case below a 50px margin was added to the whole paragraph.
You can wrap the margin code around lists or other codes and set a margin.
HTML Replacement:
Help line:
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
BBcode Usage:
- My first item
- My second item
- My third item
- My last item
Code: Select all
[Margin={NUMBER}]{TEXT}[/Margin]
Code: Select all
<p><div style="margin-left: {NUMBER}px";>{TEXT}</div></p>
Code: Select all
Enter left margin in px [Margin=NUMBER]TEXT[/Margin]