I'm using Alchemer (a survey design software) and it has limited functionality to apply CSS. I have a question with text and images that I want to be side by side if the screen is large enough (ie two columns) or convert to a single column for phones/small screens.
The issue is that the software only allows defined classes to be applied to a question.
I have tried to define my custom css as follows:
/* For mobile phones: */
.col-1 {width: 100%;}
.col-2 {width: 100%;}
@media only screen and (min-width: 600px) {
/* For tablets: */
.col-1 {width: 50%;}
.col-2 {width: 50%;}
}
and then apply '.col-1' and '.col-2' to the question. This has the effect of only applying the 100% rule, it seems to ignore the @media definitions.
Is there a way to define a single class that wraps the class definitions above? I'm thinking that might preserve the @media definitions.
Also open to other suggestions!
My code is below:
/* For mobile phones: */
.col-1 {
width: 100%;
}
.col-2 {
width: 100%;
}
@media only screen and (min-width: 600px) {
/* For tablets: */
.col-1 {
width: 50%;
}
.col-2 {
width: 50%;
}
}
text text text
<div class="row">
<div class="col-1"><img alt="" src="myimage.png" /></div>
<div class="col-2">More text<br />
<br /> More text</div>
</div>
<div class="row">
<div class="col-1">Texting text text text</div>
<div class="col-2"><img alt="" src="myimage2.jpg" /></div>
</div>