Utilizing Blazor for dynamic formatting depending on the size of the screen

How can I adjust the size and layout of my buttons that go on a picture on the right side when the screen is small? Currently, the buttons overlap the picture. Is there a way to make them smaller or have them move below the picture on a small screen?

.btn-circle {
    height: 125px;
    width: 125px;
    border-radius: 50%;
    padding: 4px;
    margin-right: 7px;
    margin-left: 7px;
}


.img-circle {
    border-radius: 50%;
    height: 125px;
    width: 125px;
}
@page "/"

<PageTitle>Accueil</PageTitle>
<div class="containerHome">
    <div class="d-flex flex-row-reverse FloatingTop">
        <a class="btn btn-circle mr-3" href="https://trudelauto.com/" >
            <img class="img-circle" src="/Images/Partners/Trudel.png" width="100 px">
        </a>
        <a class="btn btn-circle mr-3" href="https://www.jeunesnaturalistes.org/" >
            <img class="img-circle" src="/Images/Partners/jeunesNaturalistes.jpg" width="100 px">
        </a>
        <a class="btn btn-circle mr-3" href="https://amos-harricana.ca/visiter/" >
            <img class="img-circle" src="/Images/Partners/tourismeHarricana.png" width="100 px">
        </a>
    </div>  
    <img src="/Images/home.png" alt="Labyrinthe des insectes" width="100%" />


</div>

Answer №1

Perhaps I may have misunderstood your needs, but one possible solution could involve implementing a CSS media query similar to this:

/* For screens with a maximum width of 992px */
@media screen and (max-width: 992px) {
  .containerHome {
    display: flex;
    flex-direction: row-reverse;
  }
  .containerHome div.FloatingTop {
    position: relative;
    width: 100%;
  }
}

The intention here is to rearrange the stacking order of the div and image components. It's worth noting that additional adjustments might be necessary based on the specific CSS properties applied to your classes.

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

Could the problem with inset box-shadow and large border-radius on one side be related to Chrome?

Have you noticed a discrepancy in the inset box-shadow behavior with large border-radius on one side, particularly in Chrome? I'm curious about which browser is showing accurate results. Here's how it appears in Chrome: https://i.stack.imgur. ...

What is the most effective method for dimming or disabling a Material-UI div?

Within my application, there are instances where I need to dim and disable the mouse events for certain div elements based on the component's state - such as when it's loading. My initial approach involved creating a helper function that generate ...

Is there a way to customize the JavaScript click event for specific elements only?

I've been following a tutorial from codrops where each item has a hover event and a click event that triggers an anime.js function. My goal is to prevent certain items (grid cells) from triggering the anime.js function when clicked, while still allow ...

What is causing my rows to disappear even after I have made them visible?

There is a table with six rows, but initially only two are visible - a header row and one "business" row. A button allows the user to add additional rows one at a time (making existing rows visible), up to a maximum of six rows / five "business" rows. Th ...

What is the best way to structure the layout: Subdomains or External CSS for Web and Mobile Web?

I'm currently working on designing an application that needs to be compatible with both web and mobile web browsers. Due to the differences in screen sizes, I understand that I will need to create different layouts and views to ensure optimal user exp ...

The datetime-picker from Twitter Bootstrap is not accurately displayed within a modal

Utilizing the twitter bootstrap datetime-picker in conjunction with Ruby on Rails has been a seamless experience for me. However, I have encountered a small issue when displaying it within a modal at the bottom of the screen. HTML <div id="datetimePic ...

Could you please explain how to make a WordPress navigation menu that switches the background image when hovered over?

I came across a website with a very interesting navigation style that caught my attention. You can see it here: . What intrigued me the most was how when you hover over each menu item, the main picture changes. I attempted to incorporate jQuery into the c ...

Guide on implementing image tag and source in Django template language system

I need to include a base64 encoded image in JSON format into a Django HTML template. What is the best way to do this? <img src="R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp(Some 64 bit image);base64 /> How can I properly translate this code snippet into my ...

Guide to Repairing Uncaught TypeError: players.setAttribute is not a recognized method?

I'm a beginner and encountered an error saying Uncaught TypeError: players.setAttribute is not a function when submitting an action. How can I solve this issue? Please share your insights. ''' //selecting all necessary elements const s ...

Is it possible to align an image that uses position:relative with one that uses position:absolute?

On a webpage, I have placed two images. The first image is set to position:relative and the second image is positioned right below it with position:absolute. How can I ensure that as you zoom in or out, the second image remains aligned with the first ima ...

Combining and integrating rows within a table

I have created a table with two columns labeled "Team" and "Members". My question is this: how can I add a new row when the plus icon in the Team column is clicked, and only add a row in the Members column when the plus icon in that column is clicked? & ...

Tips for vertically centering text within a panel using Bootstrap 3

I am facing an issue where I have an image and a description inside a panel panel-default. The image is floated to the left while the description is on the right side. The image has the img-responsive class so that it adjusts according to the panel body w ...

What is the best way to set up unique body backgrounds for each page in WordPress?

My website consists of various pages named as : page-X.php page-Y.php page-Z.php These three pages mentioned above require unique background colors. However, the remaining pages/posts on my site inherit their background-color from the style.css file. ...

A div element set to a width of 100% that holds a lengthy text will expand to the entire width of the window,

Check out this simple webpage: https://jsfiddle.net/enxgz2Lm/1/ The webpage is structured with a side menu and a tasks container. Within the tasks container, there is a row container that includes a checkbox, title on the left, and details on the right. ...

Tips for triggering the .click() function upon returning to index.html after visiting a different page

I'm in the process of creating a portfolio website where the index.html page features a sliding navigation bar that displays a collection of projects. Each project is linked to a separate work.html page. I would like the sliding nav to automatically o ...

Adding borders to the TreeView component in Material-UI: A step-by-step guide

I have some React code here and I'm trying to display dashed lines on the left of a tree. How can I achieve this effect? I am looking for something similar to this: https://i.sstatic.net/w64VL.png Additionally, I want to combine the style of TreeVi ...

Conceal the PayPal Button

Currently, I'm facing a challenge where I need to dynamically show or hide a PayPal button based on the status of my switch. The issue is that once the PayPal button is displayed, it remains visible even if the switch is toggled back to credit card pa ...

Checkbox failing to pass value during form submission

Can anyone help me troubleshoot why my form isn't submitting a checkbox value when it's checked? <form action="codetest.php" method="get"> <div class=" form-check"> <input class="form-check-input" type="checkbo ...

The sorting icon in jQuery Data Table's search option is not functioning

I am having an issue with jQuery DataTables. When using jQuery DataTables, it provides a default search option. However, the problem arises when I search for a particular record and if the content does not match or if I find a single record, then I need to ...

What could be causing certain CSS rules to not take effect?

In my current project, I have a Flexbox layout nested within Bootstrap v4 that switches orientation based on landscape or portrait mode. There is a primary div called #no, managed by Flexbox using the order property, which contains five icons serving as bu ...