Elemente in css linksbündig?
Hey, also ich habe ein project in der dynamisch html Seiten generiert werden. Eine Seite sieht folgendermaßen aus:
<body tabindex="0" class=" jspsych-display-element" style="margin: 0px; height: 100%; width: 100%;">
<div id="jspsych-progressbar-container"><span>Completion Progress</span>
<div id="jspsych-progressbar-outer">
<div id="jspsych-progressbar-inner" style="width: 12.5%;"></div>
</div>
</div>
<div class="jspsych-content-wrapper">
<div id="jspsych-content" class="jspsych-content">
<style id="jspsych-survey-multi-choice-css">
.jspsych-survey-multi-choice-question {
margin-top: 3em;
margin-bottom: 2em;
text-align: left;
height: 75vh
}
.jspsych-survey-multi-choice-text span.required {
color: darkred;
}
.jspsych-survey-multi-choice-horizontal .jspsych-survey-multi-choice-text {
text-align: center;
}
.jspsych-survey-multi-choice-option {
line-height: 2;
}
.jspsych-survey-multi-choice-horizontal .jspsych-survey-multi-choice-option {
display: inline-block;
margin-left: 1em;
margin-right: 1em;
vertical-align: top;
}
label.jspsych-survey-multi-choice-text input[type='radio'] {
margin-right: 1em;
}
html {
scroll-behavior: smooth;
}
#jspsych-progressbar-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1000;
}
.bottom-spacer {
height: 10vh
}
</style>
<form id="jspsych-survey-multi-choice-form">
<div id="jspsych-survey-multi-choice_container_0" class="question-container"></div>
<div id="jspsych-survey-multi-choice-0" class="jspsych-survey-multi-choice-question">
<p class="jspsych-survey-multi-choice-text survey-multi-choice"><b>Gender: Please select your
gender<b></b></b><span class="required">*</span></p>
<div id="jspsych-survey-multi-choice-option-0-0" class="jspsych-survey-multi-choice-option"><input
type="radio" name="jspsych-survey-multi-choice-response-0"
id="jspsych-survey-multi-choice-response-0-0" value=" Male" required=""><label
class="jspsych-survey-multi-choice-text" for="jspsych-survey-multi-choice-response-0-0">
Male</label></div>
<div id="jspsych-survey-multi-choice-option-0-1" class="jspsych-survey-multi-choice-option"><input
type="radio" name="jspsych-survey-multi-choice-response-0"
id="jspsych-survey-multi-choice-response-0-1" value=" Female"><label
class="jspsych-survey-multi-choice-text" for="jspsych-survey-multi-choice-response-0-1">
Female</label></div>
<div id="jspsych-survey-multi-choice-option-0-2" class="jspsych-survey-multi-choice-option"><input
type="radio" name="jspsych-survey-multi-choice-response-0"
id="jspsych-survey-multi-choice-response-0-2" value=" Diverse"><label
class="jspsych-survey-multi-choice-text" for="jspsych-survey-multi-choice-response-0-2">
Diverse</label></div>
</div><input type="submit" class="jspsych-survey-multi-choice jspsych-btn" value="Continue">
<div class="bottom-spacer"></div>
</form>
</div>
</div>
</body>
Jetzt versuche ich sobald ein solches form in der html Seite ist, alles linksbündig ist. Aber nur dann. Ich bekomme es leider nicht hin. Habe es mit javascipt und text-align gemacht, funktioniert aber nicht.