This question about Topic Markup Language and applications, Not sure...: Answered

Reduce the gap after a new line

Our company uses foswiki as documentation platform. We use many short sentences and new lines. Every new line is the end of a paragraph.

Is there a solution to reduce the unused space between two paragraphs? I tried to find an entry in the PatternSkin style.css file, but i didn't find anything.

-- KlausReithmaier - 31 Oct 2012

Foswiki renders empty lines as (html) paragraph elements. If you look in the html source code you can see this happen. p elements have a margin of 1em (one line height). This can be made 0 in CSS, but it will mean that all texts become very condensed.

This is a small test to see how to do this (see the wiki text of this page).

Original text:

These

are

a couple of

lines.

With p styles set to zero margins:

These

are

a couple of

lines.

-- ArthurClemens - 31 Oct 2012

Thank you, this is exactly what i want. Which CSS file do I have to change? I think the value 0.3em or 0.5em would be perfect.

-- KlausReithmaier - 31 Oct 2012

Best if you create a theme css fileor sub skin so that your changes are not overwritten after an update.

In a text file, write
.foswikiTopic p {
margin: .3em;
}

Save as smallp.css and attach it to a topic, for instance Main.SitePreferences. Link USERSTYLEURL to that attachment, for example:

   * Set USERSTYLEURL = %PUBURLPATH%/%USERSWEB%/SitePreferences/smallp.css

-- ArthurClemens - 31 Oct 2012

It's working perfectly, thanks.

-- KlausReithmaier - 31 Oct 2012
 

QuestionForm edit

Subject Topic Markup Language and applications, Not sure...
Extension PatternSkin
Version Foswiki 1.1.5
Status Answered
Related Topics
Topic revision: r5 - 31 Oct 2012, KlausReithmaier
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy