Adjust the placement of the image in Vuetify based on the screen dimensions

Incorporating Vuetify into my project, I am faced with the challenge of changing the image location for smaller screens.

Here is my current code: https://codepen.io/yash-dhume/pen/pozMQBg?&editable=true&editors=101

<section>
  <v-container fluid justify-space-between>
    <v-layout column>
      <v-card transition="slide-x-transition">
        <v-layout row justify-space-around align-center>
          <v-flex xs7 align-center justify-center layout text-xs-straight>
            <v-card-title primary-title class="justify-center">
              <div>
                <div class="display-2">About Me</div>
                <p class="text-justify al">
                  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
                  incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis 
                  nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
                  Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore 
                  eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, 
                  sunt in culpa qui officia deserunt mollit anim id est laborum.
                </p>
              </div>
            </v-card-title>
          </v-flex>
          <div>
            <img max-width="300" src="https://loremflickr.com/640/360"> </img>
          </div>
          <div class="fill-height bottom-gradient"></div>
        </v-layout>
      </v-card>
    </v-layout>
  </v-container>
</section>

I want the image to appear below the "About Me" title and paragraph on medium or small screens. How can I achieve this?

Answer №1

To make sure the image element appears where you want it to, include it in both locations and utilize the v-if directive with the corresponding vuetify breakpoint object to determine on which viewports they should appear.

<img v-if="$vuetify.breakpoint.mdAndDown" max-width="300" src="https://loremflickr.com/640/360"></img>

For more information about the breakpoint object, visit: https://vuetifyjs.com/en/customization/breakpoints

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

What is the best way to incorporate multiple images using CSS styles?

Greetings! I am a newcomer to the world of CSS and I am currently utilizing a single image in my header, as shown below: #header { position: relative; background-image: url("../../images/header.jpg"); background-size: cover; background-pos ...

Update div element with a dynamic table without the use of jQuery or any other libraries

So here's the deal - I'm using a combination of javascript and php to manage questions in a database (sort of like digital flashcards for studying). Everything is running smoothly, except for one little hiccup. When I click the add question butto ...

Error: Unable to find reference for Google in AngularJS

I am currently integrating Google Maps API into my app for location selection. I have included the following script: <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true&libraries=places&language=en-US"></scr ...

Node.js server allows for accessing AJAX requests seamlessly

I need to send a parsed AST of JavaScript code to a server for processing, and then receive a list of completions back. However, when I log the AST to the client console before sending it, the structure appears like this: [ { "id":0, "type":"Program", "ch ...

Every time I run npm run production, it keeps flagging me for not including a semicolon in my CSS

Edit Currently, I am working with Laravel and Vue, implementing lazy loading for vue routes. Everything works smoothly when I compile with npm dev. However, when I switch to npm production, an error pops up indicating a missed semicolon in the CSS. Intere ...

Issue with AngularJS factory $http.get request receiving HTML files as response

Could someone please explain why I keep receiving an HTML file as a return from my Angular factory? This is the route on my backend: function ensureAuthenticated(req, res, next) { if (!req.headers.authorization) { return res.status(401).send({ mess ...

Selecting images using jQuery

Currently, I am in search of a jQuery image picker plugin that possesses the following features: Show a collection of images and enable the user to select one (and only one) by clicking on it If the user dislikes any of the pre-defined images, they shoul ...

Techniques for Sending Data to Child Components in Vue.js

As a newcomer to Vue.js, I am attempting to pass a value to a child component within the framework. The HTML structure is as follows: <div id="example"> <my-component v-bind:data="parentData"></my-component> </div> To achieve ...

I am experiencing trouble accessing Global Variables in Vuejs

I am experiencing an issue with my file structure which looks like this: https://i.sstatic.net/C7Ydu.png Within the main.js file, I have declared a global variable called api_url: import Vue from 'vue' import App from './App.vue' imp ...

Django Application unable to access static JavaScript within <script> tags

I am a newcomer to this and have gone through all the previous answers, but I can't seem to get this to work. Django is not reading and applying my cart.js file from my base.html template. I've double-checked my settings and files multiple times ...

Error message: IndexError: list index out of range while attempting to trigger a click event using selenium

There are a total of 41 category checkboxes on the page, with only 12 initially visible while the rest are hidden. To reveal the hidden checkboxes, one must click on "show more." This simple code accomplishes that: [step 1] Loop through all checkboxes > ...

Struggling with Typescript switch/case not correctly matching strings as expected

I encountered an unusual issue with a switch statement designed to handle different values of a string. While working on a parser and utilizing TDD, I successfully created and tested a function that parses individual lines accurately for all scenarios. M ...

Leveraging bootstrap for generating a grid structure with image sizes that adjust dynamically

Just dipping my toes into the world of CSS, so please be kind ;). Here's a setup I have for a grid: <div class="row"> <div class="col-lg-2 col-sm-3 col-xs-4"> <a href="#" class="thumbnail"> <img src="http:// ...

Obtaining Data from CRM 2011 with the Power of jQuery and JavaScript

Currently, I am facing an issue while attempting to retrieve data from CRM 2011 using jQuery. Despite my efforts, I am unable to successfully fetch the desired data. Below is the code that I have been working on: function GetConfigurations() { var oDataP ...

Error encountered: Unable to reference Vue as it has not been defined while importing an external JavaScript file

Currently, I am implementing a package called https://github.com/hartwork/vue-tristate-checkbox within my Vue.js component by adding it through the command: yarn add hartwork/vue-tristate-checkbox. In my Vue.js component, the package is imported in the fo ...

I am encountering issues with routing when using the useParams hook

I'm currently working on a project for an online car shop. My goal is to have the ProductDetails displayed on a new page when the user clicks on "more details" in the Products section, but unfortunately, it's not working as expected. Firstly, it& ...

Exploring Videogular Integration with Angular 2 through the VgAPI

My experience with Videogular2 has been interesting as I am attempting to play and control multiple videos simultaneously. The documentation suggests using a master and slave video setup to control both videos with the same controls, but this approach lim ...

Looking for assistance with submitting two forms in one AJAX request to a single file.php

Hey there, I'm looking to submit 2 forms using a single ajax or jquery request to a common file. The code snippet I currently have is as follows: <form id="filter-group1" class="form" target="remember" autocomplete="on" method="post"> <i ...

The integration between React hook form and reactstrap input components is not functioning properly

Having an issue with react-hook-form and reactstrap. The component List.jsx is causing trouble: import { useContext, useEffect } from "react"; import { ListContext, ADD_LIST } from '../providers/ShoppingListProvider'; import { Link } from "react- ...

Close overlay panel in PrimeFaces calendar

One of the components I’m currently working with is an overlayPanel that contains a calendar. Here's a snippet of the code: <p:overlayPanel hideEffect="fade" showCloseIcon="true" dismissable="true" > <h:form> <p:p ...