DEV Community

Cover image for Flexbox with my fictional company home page
Heggy Castaneda
Heggy Castaneda

Posted on

2

Flexbox with my fictional company home page

Demo
Alt Text

For responsive mobile first design:

  • use the media query for mobile portrait

@media only screen and (max-width: 480px) and (min-width: 320px), (orientation: portrait)
.page-description, .staff-intro {
    font-size: 1.8rem;
    line-height: 2rem;
}

  • Flexbox for my photos so it fits well in different device sizes
.gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
  • Use of flexbox flex-direction: column, so that name, photo, intro are lined up vertically.
  <div class="col">
    <h2 class="team-name">Ashley Sullivan</h2>
    <img src="./img/pro-asian-woman.jpg" alt="smile asian lady look up">
    <p class="staff-intro">Ashley has a MD/PhD and is creative director for anything user related.</p>
  </div>
.col {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
}

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (1)

Collapse
 
aj9775 profile image
aj9775

Hi, can you please say how to publish my demo website using GitHub? I have already created a repository in GitHub and added all my codes on it.

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay