Skip to content

Commit 2494bcd

Browse files
committed
fix avatar to work in small screens even when title is long
1 parent d239d67 commit 2494bcd

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

css/main.css

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,20 +119,20 @@ img::-moz-selection {
119119
-moz-transition: opacity 0.5s ease-in-out;
120120
transition: opacity 0.5s ease-in-out;
121121
left: 50%;
122-
height: 100%;
123-
bottom: -50%;
122+
width: 50px;
123+
margin-top: -25px;
124124
}
125125
.navbar-custom .avatar-container .avatar-img-border {
126+
width: 100%;
126127
border-radius: 50%;
127128
margin-left: -50%;
128129
display: inline-block;
129130
box-shadow: 0 0 8px rgba(0, 0, 0, .8);
130131
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .8);
131132
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, .8);
132-
height: 100%;
133133
}
134134
.navbar-custom .avatar-container .avatar-img {
135-
height: 100%;
135+
width: 100%;
136136
border-radius: 50%;
137137
display: block;
138138
}
@@ -148,22 +148,18 @@ img::-moz-selection {
148148
@media only screen and (min-width: 768px) {
149149
.navbar-custom .avatar-container {
150150
width: 100px;
151-
margin-top: -50px; /* Because of the 20px padding of the navbar, we need +20 to be at the bottom, minus whatever proportion of the image height we want */
152-
bottom: auto;
153-
height: auto;
151+
margin-top: -50px;
154152
}
155153

156154
.navbar-custom .avatar-container .avatar-img-border {
157155
width: 100%;
158-
height: auto;
159156
box-shadow: 1px 1px 2px rgba(0, 0, 0, .8);
160157
-webkit-box-shadow: 1px 1px 2px rgba(0, 0, 0, .8);
161158
-moz-box-shadow: 1px 1px 2px rgba(0, 0, 0, .8);
162159
}
163160

164161
.navbar-custom .avatar-container .avatar-img {
165162
width: 100%;
166-
height: auto;
167163
}
168164
}
169165

0 commit comments

Comments
 (0)