Padding = 0

The problem

The wikidotserver transforms the wikidot syntax in to <HTML> because than you do not need to know everything about <HTML> and so you can concentrate on the content. So Wikidot decided that some things will be done automatically for you.

So there is in <HTML> a tag <p> which has no wikidot syntax parallel. But is used on every paragraph you type…

This <p> is the cause why if you use the inline CSS syntax style="padding:0px", there will still be a padding at the top and bottom.

Wikidot syntax: [[div style="padding:0px;"]]
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vel urna nec dolor semper consequat. Ut rhoncus auctor tempor. Nulla facilisi. Nullam tristique mattis felis lobortis imperdiet. Quisque vulputate ultricies tellus, ac pellentesque justo lacinia vitae. Nam eu mi dolor. Quisque vel nulla lorem, non tempor dui. Quisque aliquam pulvinar sollicitudin. Phasellus metus turpis, convallis vitae porttitor id, dignissim ac massa.

The solution

If you wish to get rid of this padding you should make a "special" div: one with a class-name, so that you can address this class and no other because you do not wish that everything gets affected. And you need to add the following to your custom CSS:

.paddingzero p{padding:0px;margin:0px;}

The red line is to indicate the border of the <p>

Wikidot syntax: [[div class="paddingzero" style="padding:0px;"]]
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vel urna nec dolor semper consequat. Ut rhoncus auctor tempor. Nulla facilisi. Nullam tristique mattis felis lobortis imperdiet. Quisque vulputate ultricies tellus, ac pellentesque justo lacinia vitae. Nam eu mi dolor. Quisque vel nulla lorem, non tempor dui. Quisque aliquam pulvinar sollicitudin. Phasellus metus turpis, convallis vitae porttitor id, dignissim ac massa.

Now that padding 0 works you are also sure that padding:15px will generate exactly 5px around the text

Wikidot syntax: [[div class="paddingzero" style="padding:0px;"]]
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vel urna nec dolor semper consequat. Ut rhoncus auctor tempor. Nulla facilisi. Nullam tristique mattis felis lobortis imperdiet. Quisque vulputate ultricies tellus, ac pellentesque justo lacinia vitae. Nam eu mi dolor. Quisque vel nulla lorem, non tempor dui. Quisque aliquam pulvinar sollicitudin. Phasellus metus turpis, convallis vitae porttitor id, dignissim ac massa.

If you found this useful: rate it!

rating: +3+x

Created by:Steven Heynderickx

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License