Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Alternate styles workaround - am I doing it wrong?

Alternate styles workaround - am I doing it wrong? 1 Jahr 4 Wochen her #94203

  • Melarish
  • Melarishs Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 15
  • Karma: 0
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Alternate styles workaround - am I doing it wrong? 1 Jahr 4 Wochen her #94226

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 5875
  • Dank erhalten: 722
  • Karma: 223
Hello,

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

The question id is question{QID}
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Alternate styles workaround - am I doing it wrong? 1 Jahr 4 Wochen her #94229

  • Melarish
  • Melarishs Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 15
  • Karma: 0
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Alternate styles workaround - am I doing it wrong? 1 Jahr 4 Wochen her #94230

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 5875
  • Dank erhalten: 722
  • Karma: 223
#question1795.list-radio ul.answers-list {
text-align: left;
}
Or just
#question1795 ul {
text-align: left;
}

Learn CSS : www.w3.org/Style/CSS/
Letzte Änderung: 1 Jahr 4 Wochen her von DenisChenu.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: Melarish

Alternate styles workaround - am I doing it wrong? 1 Jahr 4 Wochen her #94231

  • Melarish
  • Melarishs Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 15
  • Karma: 0
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
Letzte Änderung: 1 Jahr 4 Wochen her von Melarish.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.201 Sekunden
Donation Image