</div>
<form method="post" action="{link controller='AvatarEdit'}{/link}" id="avatarForm">
- <section class="section">
+ <section class="section avatarEdit">
<h2 class="sectionTitle">{lang}wcf.user.avatar{/lang}</h2>
- <dl>
+ <dl class="avatarType">
<dt></dt>
<dd>
<label><input type="radio" name="avatarType" value="none" {if $avatarType == 'none'}checked="checked" {/if}/> {lang}wcf.user.avatar.type.none{/lang}</label>
</dl>
{if $__wcf->getSession()->getPermission('user.profile.avatar.canUploadAvatar')}
- <dl class="jsOnly{if $errorField == 'custom'} formError{/if}" id="avatarUpload">
+ <dl class="avatarType jsOnly{if $errorField == 'custom'} formError{/if}" id="avatarUpload">
<dt>
{if $avatarType == 'custom'}
{if $__wcf->getUserProfileHandler()->getAvatar()->canCrop()}
<small>{lang}wcf.user.avatar.type.custom.description{/lang}</small>
{* placeholder for upload button: *}
- <div></div>
+ <div class="avatarUploadButtonContainer"></div>
{if $errorField == 'custom'}
<small class="innerError">
{/if}
{if MODULE_GRAVATAR}
- <dl{if $errorField == 'gravatar'} class="formError"{/if}>
+ <dl class="avatarType{if $errorField == 'gravatar'} formError{/if}">
<dt><img src="https://secure.gravatar.com/avatar/{@$__wcf->user->email|strtolower|md5}?s=96{if GRAVATAR_DEFAULT_TYPE != '404'}&d={@GRAVATAR_DEFAULT_TYPE}{/if}" alt="" class="userAvatarImage icon96" /></dt>
<dd>
<label><input type="radio" name="avatarType" value="gravatar" {if $avatarType == 'gravatar'}checked="checked" {/if}/> {lang}wcf.user.avatar.type.gravatar{/lang}</label>
--- /dev/null
+.avatarEdit .avatarType {
+ display: flex;
+
+ > dt {
+ flex: 0 0 auto;
+ order: 2;
+ }
+
+ > dd {
+ order: 1;
+ }
+
+ .avatarUploadButtonContainer {
+ margin-top: 10px;
+ }
+
+ @include large-screen-only {
+ /* use fixed height to ensure a constant gap between <dl> with and without an image */
+ height: 100px;
+
+ > dt:not(:empty) {
+ margin: 0 0 0 30px;
+ }
+
+ > dd {
+ flex: 1 1 auto;
+ }
+
+ & + .avatarType {
+ margin-top: 30px;
+ }
+
+ .avatarUploadButtonContainer {
+ margin-left: 24px;
+ }
+ }
+
+ @include small-screen-only {
+ flex-wrap: wrap;
+
+ > dt:not(:empty) {
+ flex: 0 0 100%;
+ margin-top: 20px;
+ text-align: center;
+ }
+
+ > dd {
+ flex: 0 0 100%;
+ }
+
+ .avatarUploadButtonContainer {
+ text-align: center;
+ }
+ }
+}