Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How to modify height of "top area"

  • mafo
  • mafo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 10 months ago - 8 years 10 months ago #120418 by mafo
Hello everybody,

I'd like to decrease the height of the "top area" (how is it called?) where the survey's title and description is shown.

Thank you for you help!

mafo
Last edit: 8 years 10 months ago by mafo.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago #120422 by tpartner
Replied by tpartner on topic How to modify height of "top area"
Which template are you using?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • mafo
  • mafo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 10 months ago #120429 by mafo
Replied by mafo on topic How to modify height of "top area"

tpartner wrote: Which template are you using?


I use the default template.
But I think I already found the answer to my question.
In "template.css" there are the following lines of code:
Code:
td.survey-description {
  text-align: center;
  background-color: #EEF6FF;
  padding-bottom: 20px;
}

If I replace "20px" by "10px", the height decreases :).
The topic has been locked.
  • mafo
  • mafo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 10 months ago #120433 by mafo
Replied by mafo on topic How to modify height of "top area"
Unfortunately, this is not yet the answer to my question :(.

The code
Code:
td.survey-description {
  text-align: center;
  background-color: #EEF6FF;
  padding-bottom: 20px;
}
refers only to the top area of the welcome page! But on the following pages of the survey the top area still has another height.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago - 8 years 10 months ago #120466 by tpartner
Replied by tpartner on topic How to modify height of "top area"
That style rule should also apply to survey pages. Can you give a link to a test survey?

You may also try changing this in survey.pstpl:
Code:
        <td class="survey-description">
            <h2>{SURVEYNAME}</h2><br />
            <p>{SURVEYDESCRIPTION}</p>
        </td>

To this:
Code:
        <td class="survey-description">
            <h2>{SURVEYNAME}</h2>
            {if(SURVEYDESCRIPTION, '<p>'+SURVEYDESCRIPTION+'</p>', '')}
        </td>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 8 years 10 months ago by tpartner.
The topic has been locked.
  • mafo
  • mafo's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 10 months ago - 8 years 10 months ago #120584 by mafo
Replied by mafo on topic How to modify height of "top area"

tpartner wrote: That style rule should also apply to survey pages. Can you give a link to a test survey?

You may also try changing this in survey.pstpl:

Code:
        <td class="survey-description">
            <h2>{SURVEYNAME}</h2><br />
            <p>{SURVEYDESCRIPTION}</p>
        </td>

To this:
Code:
        <td class="survey-description">
            <h2>{SURVEYNAME}</h2>
            {if(SURVEYDESCRIPTION, '<p>'+SURVEYDESCRIPTION+'</p>', '')}
        </td>


Sorry, for this survey, I can't give a link.
There are startpage.pstpl, welcome.pstpl, privacy.pstpl, navigator.pstpl and endpage.pstpl but no survey.pstpl.

But I think, I found another solution. I did not only modify
Code:
td.survey-description {
  text-align: center;
  background-color: #EEF6FF;
  padding-bottom: 20px;
}

to
Code:
td.survey-description {
  text-align: center;
  background-color: #FFFFFF;
  padding-bottom: 20px;
}

but also modified the next lines of syntax, namely I modified
Code:
.page-odd td.survey-description {
    background-color: #EEF6FF;
}

to
Code:
.page-odd td.survey-description {
    background-color: #FFFFFF;
}
Last edit: 8 years 10 months ago by mafo.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose