The horizontal scrollbar becomes visible on the screen

How can I overlay two SVG images on top of each other? I have created a section with a container that contains a row.

The row has a class float-end, and within the row, there are two containers each containing an SVG.

I modified the CSS to position the SVGs absolutely, which worked but it resulted in a horizontal scroll bar. I've tried several solutions but haven't been able to resolve the issue.

Thank you in advance for your assistance!

body {
  padding: 0 !important;
  margin: 0 !important;
}

#svg1 {
  position: absolute;
  z-index: 2 !important;
  filter: drop-shadow(0px 3px 6px rgba(0, 0, 0, 0.16));
}

#svg2 {
  position: absolute;
  z-index: 1 !important;
  filter: drop-shadow(0px 3px 6px rgba(0, 0, 0, 0.16));

  
}

#svg2 path{
  d:path('M2032.906,316.652c-29.922,11.176-125.248,135.8-176.452-11.575s-65.814-28.162-108.034-59.206-99.488-84.638-69.539-161.431S1754.629-21.08,1754.629-21.08h278.277');
  animation: morph 5s infinite;
}

#svg2:hover path{
  d:path:hover('M2032.906,299.7c-44.543,52.9-130.008,123.125-181.212-24.248s-72.743-22.043-103.274-29.58-81.155-90.923-56.907-164.4,63.116-102.55,63.116-102.55h278.277');
}

@keyframes morph {
  0%, 100%{
    d:path('M2032.906,316.652c-29.922,11.176-125.248,135.8-176.452-11.575s-65.814-28.162-108.034-59.206-99.488-84.638-69.539-161.431S1754.629-21.08,1754.629-21.08h278.277');
  }
  50%{
    d:path('M2032.906,299.7c-44.543,52.9-130.008,123.125-181.212-24.248s-72.743-22.043-103.274-29.58-81.155-90.923-56.907-164.4,63.116-102.55,63.116-102.55h278.277')
  }
}

Answer №1

To align your SVGs, you have the option to use the left or right CSS property.

For example:

#svg1 {
  position: absolute;
  z-index: 2 !important;
  filter: drop-shadow(0px 3px 6px rgba(0, 0, 0, 0.16));
  right: 0;
}

#svg2 {
  position: absolute;
  z-index: 1 !important;
  filter: drop-shadow(0px 3px 6px rgba(0, 0, 0, 0.16));
  right: 0;
}

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

Unable to extract data using Regex

Script if(x.substr(0,4)=='init') { output += 'Initialized<br>'; var rgx = /^\[typ-$\]/i; if (rgx.test(x))output+='Type identified<br>'; else output+='No type detected: ' ...

The page is reloading after the PageMethod has been utilized

I am looking to implement search functionality in my popup window. The popup includes a textbox, a button, and a grid to display the search results. This is how the popup appears: Upon clicking the search button, I have a JavaScript function set up to c ...

How to automatically adjust select view in AngularJS as model value is updated

My select element is structured as follows: <select data-ng-model="transaction.category" class="form-control" data-ng-options="category.name group by category.parent for category in categories" required> </ ...

Node.js can provide a reusable email framework that can be used across

When it comes to sending emails based on specific business functions in nodejs, I have been following a particular approach. However, I am exploring the possibility of improving this method by composing email content more efficiently. Instead of hardcoding ...

The page keeps refreshing repeatedly

Can someone help me troubleshoot this url modification script? var currentPath = window.location.href currentPath=currentPath.replace(/&amp;/g, "&"); window.location.href=path; It seems like the page keeps reloading endlessly... Any sugg ...

Tips for utilizing the html5 video player

Looking for tips on using an HTML5 video player? Share your knowledge on setting up custom controls for the player. ...

Github website logo not displaying properly

Struggling to display my favicon on my website created with Github. I've tried using the code <link rel="shortcut icon" type="image/x-icon" href="favicon.ico">, but it's not working. Can anyone provide me with the correct code? I am using B ...

Enhancing checkbox functionality with jQuery AJAX

I have a form with multiple checkboxes, and I want these checkboxes to be checked based on their values from the database using jQuery after clicking the edit button. Thank you in advance. View: <form id="frmAddBand" name="frmAddBand" method="post" ac ...

Best practices for implementing dual ngFor directives within a single tr element?

Click here to view the page The image attached shows the view I want to iterate through two ngFor loops inside the tr tag. When using a div tag inside the tr, it's looping the button next to the tag instead of where I want it in the file table header ...

How can I create space between a checkbox and its label in Google Web Toolkit (GWT)?

How can I create space between a Checkbox and its content in GWT? Checkbox c = new Checkbox("checkme"); c.setStyleName("checkbox_style"); When I try using padding or margin, the entire checkbox and its content move together. Is there a way to achieve a g ...

The troubleshooting guide for resolving issues with AngularJS data binding functionality

Exploring the world of AngularJS and encountering a minor setback with a basic example that seems to be refusing to load Angular. Within this particular example, there is a straightforward data binding test in which {{}} is utilized to display a hardcoded ...

Storing user responses in an array using jQuery Form

I have developed a form/questionnaire that prompts users with a series of questions. The initial question categorizes users into two groups, either trucks or cars in this scenario. Subsequently, the form delves into specific questions about the chosen vehi ...

Difficulty in decoding intricate JSON response using JQuery (or simply JavaScript)

Consider the function below, which retrieves JSON data from a Solr instance: var url = "http://myserver:8080/solr/select?indent=on&version=2.2&q=(title:*Hollis* OR sub_title:*Hollis*+OR+creator:*Hollis*+OR+publisher:*Hollis*+OR+format:*Hollis*++OR ...

What is the best way to vertically align a two-line nav item?

I am looking to design a navigation menu with items that can accommodate one or two lines of text. https://i.sstatic.net/nkxRL.png The items should have consistent height and the text should be vertically centered. Additionally, I want the entire box to ...

Develop an Android application package

Recently, I developed a fun and engaging memory game using HTML and Javascript in Phpstorm. Now, I am eager to convert my creation into an APK file so that I can publish it on Google Play. The only issue is that I am not familiar with the process of creati ...

It seems like there is an issue with the res.render function as it is

My goal is to capture an input from my main website. Once the input is submitted, the page should automatically redirect to /view. Despite successfully triggering the redirection with console.log(), the res.render function does not seem to be working as ex ...

Tips for adjusting the alignment of a navbar-brand and navbar using Bootstrap 5

I am currently using bootstrap to develop a webpage. I have a navigation bar at the top of the page and I would like my navbar-brand to be positioned on the right side, while my navbar links should be on the left. However, when I try to implement this, it ...

Is it possible to adjust the left property following the concealment of an element with JQuery?

My goal is to move an image element using the 'left' property after hiding a div. To achieve this, I am using JQuery's '.promise()' function. Here is my code: HTML code: <div id="outerContainer"> <div id=" ...

The implementation of useState is not functioning properly when used within a parent useState function

I am currently working with a Ticket child class where I set the total amount after changing the number of tickets. The issue I am encountering is that the setNumber function doesn't seem to work properly unless the setTotal function is commented out. ...

What is the best way to send a distinct property value in my POST request while using axios?

const postResponse = await axios.post(`${baseUrl}register`, { name: `Sara`, email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="741a15101d15324e4f424c405b524b1a171b19">[email protected]</a>' } ...