Button component in React JS fails to appear on iPhones

After building a website using reactjs, I encountered an issue where the landing page's begin button is not displaying correctly on iPhones. The website works fine on all other devices, but on iPhones, the button is barely visible - with only a faint shadow showing.

Curiously, when I use the browser responsive mode to check the website, everything appears normal. However, upon opening it on an iPhone, the display issue arises. While the button remains clickable, its visibility is severely compromised.

You can visit the website at: www.unifiedtechno.com

https://i.sstatic.net/t6WQr.jpg

Landing.js


import React from 'react';
import logo from './logo.png';

import {Link} from 'react-router-dom';

import './Landing.css';

function Landing()
{
    return (
        <>

        <div id="logo">
            <img src={logo} alt="logo"/>
        </div>
        <div >
            <Link id="begin" to ="/Home"><button id="button">Begin</button></Link>
        </div>

        </>
    );
}


export default Landing; 

Landind.css


@keyframes transitionHome {

    from{opacity: 0;}
    to{opacity:1};
    
}

#logo{
    width:100vw;
    display:flex;
    justify-content: center;
    margin-top:20vh;
    animation-name: transitionHome;
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
}

#logo img{
    width:30vh;
    height:30vh;
    transform: scale(0.5);

    animation-name:spinScale;
    animation-duration: 1s;
    animation-fill-mode: backwards;
    animation-iteration-count: infinite;
    animation-direction: alternate-reverse;
}

#begin {
    width:100vw;
    display:flex;
    flex-direction:row;
    justify-content: center;
    margin-top:10vh;
    animation-name: transitionHome;
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
}

#begin  #button{
    color:rgb(0, 82, 85);
    position:absolute;
    background-color: #3db5b5da !important;
    font-size: 2.5vh;
    font-weight: 400;
    padding:1vh;
    width:15vh;
    border-radius: 25px;
    border:none;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    box-shadow: 3px 3px 3px 5px rgba(0, 0, 0, 0.082);
    animation-name: transitionHome;
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
    -webkit-appearance: none;
}

#begin  #button:hover{
    cursor:pointer;
    background-color: rgba(25, 167, 155);
    color:rgb(255, 255, 255);
    animation-name: transitionHome;
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
}



@keyframes spinScale {

    from{
        transform: scale(0.8) rotate(0deg);
    }

    to{
        transform: scale(1) rotate(360deg);
    }
    
}


Answer №1

Consider adjusting your #begin code to have flex-direction: column along with other flex modifications for better mobile optimization.

#begin {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 2rem;
    align-items: center;
    }

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

Dropdown trigger changing image with AJAX

When a color is selected from one dropdown menu, it triggers a change in another dropdown menu and the image displayed. The ID for the dropdown affected by the color selection is "style_code". <script> function getState(val) { $.ajax({ ...

Error: Unable to find command "yarn" with sudo privileges; likewise, "create-react-app" command

When I was attempting to set up react on my system, I discovered there are two methods for installation: either through npm or yarn. As an Ubuntu 18.04 user, I already had node and npm installed. name@admin-desktop:~$ node -v v16.14.0 name@admin-desktop:~$ ...

Angular 5 is throwing an error that says: "There is a TypeError and it cannot read the property 'nativeElement' because it

Being aware that I may not be the first to inquire about this issue, I find myself working on an Angular 5 application where I need to programmatically open an accordion. Everything seems to function as expected in stackblitz, but unfortunately, I am enco ...

Utilizing Input Data from One Component in Another - Angular4

As a newcomer to Angular, I'm facing an issue where I need to access a variable from ComponentA in ComponentB. Here's the code snippet that demonstrates what I'm trying to achieve (I want to utilize the "favoriteSeason" input result in the " ...

Increase the size of FontAwesome icons in a React production environment

Lately, our React build has been displaying varying visual outcomes. Develop https://i.sstatic.net/lJnYr.png Production https://i.sstatic.net/MryDR.png As you can observe, the icon on the far left appears to be the correct size while the others are ne ...

Error message: AngularJS Jasmine spyOn: number has no functionality

I am encountering difficulties while attempting to execute a test that utilizes a mockup for a service call (retrieving location data from a web SQL database). Below is the controller code: .controller('LocationDetailCtrl', function ($scope, $s ...

Positioning html images to overlap each other without losing the ability to click

Currently, I am facing a challenge with positioning two images over each other. The back image should be at the bottom, while the center image needs to be on top of it. Additionally, there is a requirement for placing a random link (in this case google.com ...

Basic angular service malfunctioning

I've been trying to create an angular service but seem to be having trouble with it. I've attempted various solutions and searched extensively for answers. Any assistance would be greatly appreciated. //service angular .module('RDash ...

Get the desired text following the second <br> tag using jQuery

I am trying to identify a specific string that comes after the second occurrence of <br> tag and then check if this string contains any numbers. If there are no numbers present, I want an alert to be shown. The code for performing this action is func ...

Enhance your view of the iFrame's CONTENT by zooming in

I'm attempting to magnify (without altering the dimensions) an iFrame containing a SWF file. <iframe src="http://ray.eltania.net/TEST/swf-play/swf/testMotion.swf" width="600px" height="500px" frameBorder="0"></iframe> http://jsfiddle.net ...

Objects within an array are not sorted based on their properties

I'm currently struggling with sorting an array of objects based on a specific property. Despite my efforts, I can't seem to figure out what's causing the issue as it remains unsorted. Would appreciate some assistance. You can take a look at ...

Guide to Increasing Table Index within Nested Loop in Vue.js 3

How can I increment table indices within a nested loop in Vue.js 3? I am currently working with two-level deep arrays using Vue.js, and I need an index that starts at 1 and increases for each item in the top-level array. The desired output is as follows: ...

How can I center align all images using Bootstrap?

My current grid images are aligned in a specific way. https://i.sstatic.net/RmNE9.png However, I aim to adjust the grid images to look like this, specifically focusing on centering "img 1". How can I achieve this? https://i.sstatic.net/frNvp.png HTML ...

The noRowsOverlay in ag-grid vanishes upon refresh of rowData

When there are no matching records for applied filters, I want to display a no results message. The code below accomplishes this: <AgGridReact onFilterChanged={({ api }) => { if (api.getDisplayedRowCount()) { api.hideOverlay(); } els ...

Utilizing ThreeJS alongside React version 16

I'm currently attempting to display 3D files in my react project using ThreeJS. My react project is running on version 16.13.1. Upon installing the packages @react-three/fiber and @react-three/drei, I encountered an error stating "Module not found: Ca ...

Encountering an issue when trying to retrieve the "createdAt" property in Cloud Code using the Parse Framework

I am working with Cloude Code to develop a more complex query, but I am having trouble accessing the automatically created "createdAt" property by Parse. Here is my code: Parse.Cloud.define("get_time", function(request, response) { var query = new Par ...

Exploring search filters using KnockoutJS

I'm currently working on incorporating a search filter into my web application. After reading some informative articles and exploring various Jsfiddles, I've attempted to enable searching by TypeName to display the corresponding row with that spe ...

Having an issue with my JavaScript burger menu not functioning properly

I'm really struggling to figure out why my code isn't working. I've checked and rechecked all the links, and everything seems correct. Could it possibly be because the code is outdated? I've been stuck on this for two days now and can&a ...

Discover the potential of JavaScript's match object and unleash its power through

In the given data source, there is a key called 'isEdit' which has a boolean value. The column value in the data source matches the keys in the tempValues. After comparison, we check if the value of 'isEdit' from the data source is true ...

Utilizing Bootstrap 4 columns to control the height of a separate column

Is there a way in CSS to make one column in a bootstrap grid determine the height of another column within the same row? For example, consider the following scenario: <div class="row"> <div class="col col-sm-6" id="column1"> <!-- an e ...