Arranging the Burgers on the Menu using Flexbox

I'm looking to develop a simple note-taking app, but I'm struggling to figure out how to place a burger menu on the right side of a flexbox. Below are my JS and CSS files:

JavaScript / HTML


    <div className={styles.wrapper}>
        <main className={styles.content}>
            <div className={styles.templatelist}>
                <div className={styles.template}>
                    <h2>Daily Meeting Minutes</h2>
                    <div className={styles.properties}>
                        <p>Sections: 5</p>
                        <p>Questions: 5</p>
                        <p>Tables: 5</p>
                    </div>
                </div>
            </div>
        </main>
      </div>

I've attempted to create a new div and position it using top and left properties, but I haven't been successful.

CSS


.wrapper {
    display: flex;
    margin-top: 2rem;
}

.content {
    display: flex;
    flex-direction: column;
    margin: auto;
    width: 50%;
    height: 100%;
}


.templatelist {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
}

.template {
    width: 100%;
    height: 6rem;
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(13.3px);
    -webkit-backdrop-filter: blur(13.3px);
    border: 1px solid rgba(255,153,0, .5);
}

.properties {
    display: flex;
    flex-direction: row;
    margin-top: 1rem;
    gap: 2rem;
}

Codepen https://codepen.io/Vylex/pen/ZERgxzm

Desired outcome

Answer №1

.template {
    width: 100%;
    height: 6rem;
    border-radius: 16px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(13.3px);
    -webkit-backdrop-filter: blur(13.3px);
    border: 1px solid rgba(255,153,0, .5);
    display: flex;
    justify-content: space-between;
}

.properties {
    display: flex;
    flex-direction: column;
}

p {
    margin: .5rem;
}

Answer №2

To improve your layout, consider the following steps:

<div class="templatelist">
  <div class="template">
    <h2>Daily Meeting Minutes</h2>
    <div class="properties">
      <p>Sections: 5</p>
      <p>Questions: 5</p>
      <p>Tables: 5</p>
    </div>
  </div>              
<div class="menu">Burger</div>

Transform the templateList class using display: flex, flex-direction: row, and justify-content: space-between. This adjustment should help enhance the appearance of your design.

Answer №3

Cascading Style Sheets and HyperText Markup Language

.wrapper {
    display: flex;
    margin-top: 2rem;
}

.content {
    display: flex;
    flex-direction: column;
    margin: auto;
    width: 50%;
    height: 100%;
}


.templatelist {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
}

.template {
    width: 100%;
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(13.3px);
    -webkit-backdrop-filter: blur(13.3px);
    border: 1px solid rgba(255,153,0, .5);
}

.properties {
    display: flex;
    flex-direction: row;
    gap: 2rem;
  justify-content: space-between;
  align-items: center;
}

.burger{
  font-size: 2em;
}

.options{
  display: flex;
  column-gap: 1em;
}
      <div class="wrapper">
        <main class="content">
            <div class="templatelist">
                <div class="template">
                  <div class="properties">
                    <div class="left">
                      <h2>Daily Meeting Minutes</h2>
                    <div class="options">
                        <p>Sections: 5</p>
                        <p>Questions: 5</p>
                        <p>Tables: 5</p>
                      </div>
                    </div>
                  <div class="burger">
                    <p>:</p>
                  </div>
                    </div>
                </div>
            </div>
        </main>
      </div>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

CSS - stacking containers vertically with scrollbars

I am in need of a vertical stack of blocks, which may include scrolls, contained within a fixed-sized container without scrolls. The number of visible blocks is dynamically managed by JavaScript code. Some blocks can be hidden or shown, and when a block is ...

Ways to prevent memory leaks in useEffect on React hooks

I've implemented the useEffect hook to fetch data from the server and display it in a list. However, when I try to sign up, I encounter the following warning message: Can't perform a React state update on an unmounted component. This is a no-op ...

Dynamic video autoplay with a hover effect using Bootstrap 3

I am looking to create a hovering effect on an autoloop video similar to what is seen on this website - This specific section of the website demonstrates the effect I am trying to achieve. Prior to hovering, the autoloop video has an overlay displayed on ...

After refreshing the page, Google Chrome finally displays the CSS styles correctly

I'm currently working on a JavaScript script to showcase images on a webpage. These images are loaded using an AJAX request and a CSS style is directly applied using jQuery. The script functions correctly on Firefox, Opera, and IE, but Google Chrome i ...

Is it unnecessary to use both "width: inherit" and "float: none

When learning about responsive design, one pattern that is frequently seen is: @media screen and (max-width: 480px){ .class1{ width: inherit; float: none; } .class2{ width: inherit; float: none; } f ...

Images in gallery slider are excessively large

Hello, this is my very first post on stackoverflow. Please forgive any atypical elements in this post. I have a Django Website with a gallery slider, but I am facing an issue where the images appear way too big. You can view them here: I have dedicated n ...

Delay the standard equal height function in Bootstrap 4

Currently, I am working with multiple columns in Bootstrap using col-md-6, but I am experiencing an issue with them having equal heights. I do not want this behavior and I am using Bootstrap 4 for this project. Can anyone provide assistance with this? ht ...

Creating a React button animation with CSS vibes

When I click a button, I want a subtle sparkle to appear and disappear quickly, within half a second. I've thought about using a gif, but it requires a lot of manual artistic work to achieve the desired effect. Is there a way to utilize the Animatio ...

The data type 'string' cannot be assigned to the data type 'undefined'

These are the different types available: export type ButtonProperties = { style?: 'normal' | 'flat' | 'primary'; negative?: boolean; size?: 'small' | 'big'; spinner?: boolean; } export type ...

Accelerate website loading

After testing the speed of my site's loading, I discovered that the reason for its slow speed is... Some proxy caching servers do not cache resources with a "?" in the URL. To address this issue, it is recommended to remove the query string and enc ...

HTML5 template design clashes with Smarty framework

I've been working with a simple pattern like this: <input type="text" pattern="[a-z]{2}" required ../> However, it never seems to be valid. The pattern doesn't seem to work as expected. I have only tested it in Firefox so far. Is there ...

Discrepancies in Video Element Size: Mobile Versus Desktop

Why does the video element have different sizing behavior between mobile and desktop? I noticed on this website that on desktop Chrome, its width is about 35% of the browser while on iPad Chrome it's only about 10% Does anyone know why this is happen ...

Lines running horizontally on either side of the text

I recently found a helpful solution on Stack Overflow, but it's not exactly what I'm looking for due to two main reasons: I am unsure how to adjust the width of the lines to make them shorter. The solution uses H2, however, I have already d ...

Tips for including arrow symbols in your HTML/CSS code and ensuring that they are adaptable to various

I have been working on the following HTML layout using Bootstrap 4, but I've hit a snag with one element. Check out the design preview below: https://i.sstatic.net/V3tzT.png The HTML code is as follows: <section class="hm_sc_1"> < ...

Adding a logo to a website that utilizes CSS, HTML, JS, and Bootstrap

Hey there! I'm new to the world of Front-end development and I've been learning by watching videos and reading everything I can find on the Internet. Currently, I'm using HTML, CSS, and JS for my website. Can anyone help me figure out how to ...

Issue: The process of gathering data for /dashboard/widget page is still experiencing timeouts despite two previous attempts in NextJS

While attempting to compile the code for Next.js, a warning is displayed: info - Compiled successfully warn - Restarted collecting page data for /dashboard/widget because it took more than 60 seconds warn - See more info here https://nextjs.org/docs/mes ...

The Redux state fails to update on the initial attempt

I have encountered an issue with my state setup and reducer logic. Here is how my state is initialized: const initialState: PhotoState = { photos: [], }; The reducer function is defined as follows: const initialState: PhotoState = { photos: [], }; ex ...

How can I easily implement basic password protection on a straightforward Next.js web app hosted on Vercel?

Adding a simple password validation step to a dashboard that only a select few would access. The data is not highly sensitive, but some basic protection is desired to limit unauthorized access. While not expecting targeted attacks from hackers, the goal is ...

Tips on customizing default Polymer CSS

Currently, the core-toolbar features an indent class that shifts the title to the right by 60px. However, material design guidelines suggest that the margin should actually be 80px (oddly enough, the number 60 is not mentioned in the documentation). I cou ...

Is there a way to improve error readability in React when using webpack?

Attempting to solve the issue, I decided to make a change in my npm script. Initially, it was set to operate in production mode by default: The original script looked like this: "client": "webpack -w --config ./gen/config/webpack.config.js& ...