Flexbox center cropped responsive images align justified

Some of you might know that I’m one of main developers who worked on the bhg.com site relaunch of 2015. I enjoyed applying many responsive techniques to the website. I used freely the relative new FLEXBOX feature in CSS.

One of the more challenging aspects of the site design is the homepage. The designer’s dream was to create a responsive center cropped images horizontal alignment in a justified fashion. When I say “justified” I mean the typography alignment justified as if you would do below:

To apply such an effect to web design is not as an easy task. Although flexbox does have the justify-content: space-between it actually does not work with this particular requirement. Because in addition to the justified look, the designers also wish to have the images naturally increase in size while the viewport increases in width to achieve a fully responsive look. To add to the challenge, the images inside the boxes are not all square images. The square look must be achieved by CSS without distorting the images.

The ultimate effect:

This effect requires the image to increase its dimensions while maintain its ratio with the parent container.

I achieved this effect by using percentages with flexbox. I applied percentage negative margins to stretch the inner boxes for the justified look. The width of the image inside of the box is 80% of the its containing box. This allows the images to resize based on the viewport width.

Yoga poses that help my lower back pain

I’ve been doing yoga for a few years. Because of my work I sit too much and this is causing too much pressure for my lower back.  I experience lower back sore & pain from time to time.

Here are some yoga poses that help my lower back feel better

The bridge pose with a block underneath lower back
Yoga bridge with block

Rolled up blanket underneath the spine
Yoga roll under the spine

Against the wall
Yoga against the wall

CSS3 animation, absolute centering, align background-image right and bottom

I was playing with codrops dialog effects and learned the following:

New absolute centering using flexbox

.dialog {
  position: fixed;
  diplay: flex;
  align-items: center;
  justify-content: center;

Add css class for animation effect and remove it on animation end

$(selector).addClass('effect').on('webkitAnimationEnd MSAnimationEnd oAnimationEnd animationend', function(){ 
}); // assuming the class effect applies animation on the selector element

How to align background-image to the right and bottom

background-position: calc(100% - 30px) calc(100% - 10px);

Simple dialog effects pen

Stress at work

In the past when I was stressed out at work due to certain situations or people, I often swept it under the rug. Recently I started challenging myself to deal more directly with my emotions.

Unresolved emotions hold on to me more strongly than perhaps normal people. It keeps me up at night and I’ve been dealing with sleeping issues for 10 years.

It’s not at all an easy challenge but it’s the only way I can get better.

Everyone deals with stress differently. I often find myself angry during a stressful situation and want to lash out at someone. Instead of lashing out, I challenge myself to step away and more thoroughly identify and analyze the stressor. My first step is trying to view the situation from a third party’s perspective. If I cannot do it myself, I reach out to a trustworthy coworker for a second opinion. While talking about the event with a third party, it helps me understand myself better.

My coworker pointed out the importance of trust at work. I realize my trust with coworkers come naturally at 100%. It however changes based on my interaction and/or observation of the person. We learn to trust people who keep their promises and who do what they say they’ll do. In other words, we assign credibility to people who can successfully predict their own behavior. Looking back I realize losing trust caused me to dislike the person and avoided working with the person. It’s important for me to bring this up with the person to prevent the negative relationship to continue. Although it was difficult having the conversation but it cleared up the air and helped me move on.

Growing up I was taught to always criticize myself in every conflict. Finally I realize that is not the best way to solve issues. Criticizing myself doesn’t always lead to improvement and often it just harbors negative emotion that is degrading to my mental health. The instructors who led the group therapy I participated always stressed the need to unlearn and relearn our emotion handling routines. It took decades to develop my routine; it shouldn’t surprise me that I’m still taking baby steps to unlearn and relearn everything.

Guest Post: Breaking The Low Mood Cycle

Originally posted on Captain Awkward:

Image: a cheerful orange blob monster is chatting to a friend using a speech bubble containing a question mark and exclamation mark. The friend is a grumpy grey blob monster who looks away expressing grumpiness. Its speech bubble contains a grey scribble.

Hello friends! It’s Elodie Under Glass here with a guest post on Low Moods.

I particularly want to thank Quisty, Kellis Amberlee and TheOtherAlice  for their kindly help in reading and editing this piece. It would not have existed without their care, support, compassion, and wonderful editorial abilities. They are truly remarkable humans! (edited: And thanks to the radiant and patient NessieMonster, who let me come to her city and follow her around, burbling insensibly about this post, for far longer than most people would have.)

So recently, I went on a Stress and Mood Management course, and I thought that you all might enjoy sharing what I’ve learned.

This post is something of a correction/update to Adulthood is a Scary Horse, a post for the Captain which I was never quite satisfied with. It really crystallized for me on this course, in our…

View original 3,458 more words