Tips for adjusting the button icon size based on the size of the page

I need some assistance with resizing an icon in my HTML page that is inside a container with a transparent button.

This is how the div is declared in my HTML file:

<div class="container button">
    <div class="col-xs-10 col-sm-70">
        <a href="#kmeans" class="btn btn-primary"><i class="fa fa-question-circle fa-4x" aria-hidden="true" title="How does it work"></i></a>
    </div>
</div>

This is the CSS for setting up the container:

section#analyze .container.button {
    border: 2px solid black; /*delete'*/
    position: relative;
    margin-right: 10%;
    width: 5%;
    display: none;
    height: 120%;
}

and this is how I set the button in the css:

section#analyze .container.button .btn-primary {
    background-color: Transparent;
    background-repeat:no-repeat;
    border: none;
    cursor:pointer;
    overflow: hidden;
    outline:none;
    font-size: 100%;
    width: 100%;
    height: 100%;
    left: 20%;
    margin-top: 20%;
    position: initial;
}

Any suggestions on how to make the icon resize with the page?

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

stopping a float-left div from being pushed down by a table

I am facing an issue with two float:left divs that are supposed to stack left-to-right. One div is a fixed width left nav, while the other should span the remaining width of the browser. The problem arises when there is a table in the second div with multi ...

Solving Problems with Image Placement using CSS

As I embark on learning responsive CSS, the concept is still quite new to me. One issue I'm facing is the alignment of the images on the second row in comparison to the top images. I aim to have 4 images per row, with the flexibility for the image siz ...

My Node/Express service seems to be generating a span in the logs, but I am unable to locate my service in the Ja

Currently, I am in the process of setting up Jaeger tracing for my Node.js microservice using Express.js. After adding a basic GET request handler in my Express app and hitting the endpoint via curl, I notice that a span is created in the logs. However, w ...

Alphabetically sorting objects in an array using Angular

If your TypeScript code looks something like this: items: { size: number, name: string }[] = []; ngOnInit(): void { this.items = [ { size: 3, name: 'Richard' }, { size: 17, name: 'Alex' }, ...

Converting an array of images into blob format and displaying it using PHP

I am attempting to convert an array of images into blob format and then send it to a PHP script for data processing. However, I am encountering an issue where the array of blobs is not being sent correctly, and I am unsure why this is happening. Here is my ...

What is the best way to transfer information from a service to JSON format?

Currently, I am developing an Angular 6 application that involves creating a dynamic form using data obtained from a JSON file. JSON Data: jsonData: any = [ { "elementType": "textbox", "class": "col-12 col-md-4 col-sm-12", "key": ...

What methods are available for populating bootstrap columns dynamically with the use of jquery, php and smarty templating?

I am currently working on developing a dynamic news article module that needs to resemble the layout of a traditional newspaper article. The height of the news article must be restricted based on the size of the current view port. All information for the a ...

Is it possible for me to modify the Event Listener functionality of PayPal buttons to trigger a hidden surprise, and then revert it back to its original settings afterwards?

I am currently working on implementing a fun easter egg feature on my website that will activate when a specific donation amount is entered. Is there a way to customize the behavior of the PayPal button so that instead of redirecting to the standard PayPa ...

Design the parent element according to the child elements

I'm currently working on a timeline project and I am facing an issue with combining different border styles for specific event times. The main challenge is to have a solid border for most of the timeline events, except for a few instances that share a ...

Utilizing the power of Vue.js 3 to dynamically apply multiple custom classes to a table

I recently started using Vue for my frontend project and I am facing a challenge. I am trying to dynamically add classes to my table based on user input. Currently, I am able to add only one class, but I want to extend this functionality to work with an ar ...

Oops! Looks like we couldn't locate the request token in the session when attempting to access the Twitter API

Every time I attempt to connect to the Twitter API using Passport OAuth, an issue arises that redirects me to an error page displaying this message: Error: Failed to locate request token in session at SessionStore.get (/Users/youcefchergui/Work/ESP/socialb ...

Center align with padding on all sides

I'm trying to align the elements so that they all line up perfectly without any extra spacing. I've used justify-content: center to center the elements, but they end up looking like this. enter image description here However, I want everything ...

Determine time without discerning the timezone of the device

This script checks the current time against a specified deadline time. // Get current date/time var now = new Date(); // Set up deadline date/time var deadline = new Date(); //deadline is 1830hrs; deadline.setHours(18); deadline.setMinutes(30); // Chec ...

Submitting Data Forms with AJAX on dynamically loaded webpages

Issue with Form Submission in Ajax-Generated Page I am experiencing an issue with form submission on a page generated within AJAX. The page contains two forms, #form1 and #form2. The jQuery code for submitting the form is as shown below: jQuery("#form1" ...

Having trouble with CSS text not wrapping correctly?

While working on a web application, I encountered an issue where the text within a <div> element on my page was not wrapping properly and instead overflowing outside the box. The <div> in question goes through two stages: one where it is not e ...

What is the best way to filter through JSON data in Vue.js?

I'm encountering an issue with my JSON file that I am rendering to a table. I have 11 columns including id, name, and more. I want to search by every column, but the functionality only works for one column. If I try to filter the data multiple times, ...

What is the process for creating an animation with a filter or toggle effect?

I am eager to create an interactive animation for my search engine on my website, but I'm struggling with where to begin. Here is the relevant HTML snippet: <div id="companyRoster" class="companyRoster container"> <div class="row mb-2"& ...

What is the most efficient way to create a bufferGeometry with multiple particle sizes for optimal performance?

Using a bufferGeometry, I created a THREE.Point object to display thousands of particles with the PointsMaterial material. Changing textures and colors on runtime worked perfectly for me. However, I faced an issue when trying to have particles of differen ...

Enjoy the convenience of Meteor listening for multiple events and only firing once

One interesting feature of Meteor is the ability to set eventHandlers for templates. I have a text input field where users can type, paste, and more. So far, I've been using this code: Template.myTemplate.events({ 'keyup #inputfield': ...

Having trouble with my React input field - once I set the value, it becomes immutable

After setting the value of my state component, my React input component becomes uneditable state = {text: ''} return( <input id="search" type="text" value={this.s ...