Alternate styles workaround - am I doing it wrong?

More
4 years 3 months ago #94203 by Melarish
Melarish created the topic: Alternate styles workaround - am I doing it wrong?
I'm trying to do docs.limesurvey.org/Workarounds%3A+Quest..._colour_of_questions

to make certain questions align left. It doesn't seem to be working though and I tried with both ID and question code. My code is
.list-radio ul {
text-align: center;
}
div#1795 .list-radio ul {
text-align: left;
}

I did refresh after saving changes. Version 2.00+ Build 130305

Please Log in to join the conversation.

More
4 years 3 months ago #94226 by DenisChenu
DenisChenu replied the topic: Alternate styles workaround - am I doing it wrong?
Hello,

try:
.list-radio ul {
text-align: center;
}
#question1795 .list-radio ul {
text-align: left;
}

The question id is question{QID}

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
4 years 3 months ago #94229 by Melarish
Melarish replied the topic: Alternate styles workaround - am I doing it wrong?
Thanks! it now appears on the CSS. Although it still doesn't work cuz the general .list-radio ul appears inside the question div, overriding it. Does this mean I cannot do this - have most radio lists centred but specific ones left-aligned?
<div id="question1795" class="list-radio mandatory"> //question div
	<table class="question-wrapper">
		<tr>
			<td class="questiontext">
				<span class="asterisk">*</span>Are you Right- or Left-handed?<br /><span class="questionhelp"></span>
 
				<span class="questionhelp hide-tip" id="vmsg_1795"></span>
			</td>
		</tr>
		<tr>
			<td class="answer">
 
<ul class="answers-list radio-list"> //question div gets overridden

Please Log in to join the conversation.

More
4 years 3 months ago - 4 years 3 months ago #94230 by DenisChenu
DenisChenu replied the topic: Alternate styles workaround - am I doing it wrong?
#question1795.list-radio ul.answers-list {
text-align: left;
}
Or just
#question1795 ul {
text-align: left;
}

Learn CSS : www.w3.org/Style/CSS/

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last Edit: 4 years 3 months ago by DenisChenu.
The following user(s) said Thank You: Melarish

Please Log in to join the conversation.

More
4 years 3 months ago - 4 years 3 months ago #94231 by Melarish
Melarish replied the topic: Alternate styles workaround - am I doing it wrong?
Thanks! It works now (I need to figure out how the priorities work in CSS)

That site is very helpful http://www.w3.org/CSS/Training/Priority_level_of_selector
Last Edit: 4 years 3 months ago by Melarish.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now