Constrain width and height of image answer previews
This commit is contained in:
parent
6647208d3a
commit
b5649a6ea8
2 changed files with 12 additions and 1 deletions
|
@ -79,6 +79,17 @@ header {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.answer-kind-image {
|
||||||
|
.answer-kind-image-container {
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 50vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.login-intro {
|
.login-intro {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div id="<%= "question_answer_#{question.id}_preview" %>">
|
<div class="answer-kind-image-container" id="<%= "question_answer_#{question.id}_preview" %>">
|
||||||
<% if question.answer.present? %>
|
<% if question.answer.present? %>
|
||||||
<%= image_tag question.answer.image %>
|
<%= image_tag question.answer.image %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue