How to make website loading screen last long enough for users to experience it

I’m trying to get users to actually see the loading screen that i have worked on. I would like it to last around 3-5 seconds JQuery is fine because its already in use and heres the code and a
I really don’t know much Jquery so thats why im asking you guys any fix would help another note that this is going on a bakery website (Don’t really know why you would need to know but yeah.) pic,

part of animation rotation



<div class="center">
  <div class="wave"></div>
  <div class="wave"></div>
  <div class="wave"></div>
  <div class="wave"></div>
  <div class="wave"></div>
  <div class="wave"></div>
  <div class="wave"></div>
  <div class="wave"></div>
  <div class="wave"></div>
  <div class="wave"></div>
</div>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
  $(window).on("load",function(){
    $(".wave").fadeOut("slow");
    $(".center").fadeOut("slow");
  });

</script>

<style>
  .content{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
  }

  .bodY {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.center {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #000;
}
.wave {
  width: 5px;
  height: 100px;
  background: linear-gradient(45deg, cyan, #fff);
  margin: 10px;
  animation: wave 1s linear infinite;
  border-radius: 20px;
}
.wave:nth-child(2) {
  animation-delay: 0.1s;
}
.wave:nth-child(3) {
  animation-delay: 0.2s;
}
.wave:nth-child(4) {
  animation-delay: 0.3s;
}
.wave:nth-child(5) {
  animation-delay: 0.4s;
}
.wave:nth-child(6) {
  animation-delay: 0.5s;
}
.wave:nth-child(7) {
  animation-delay: 0.6s;
}
.wave:nth-child(8) {
  animation-delay: 0.7s;
}
.wave:nth-child(9) {
  animation-delay: 0.8s;
}
.wave:nth-child(10) {
  animation-delay: 0.9s;
}

@keyframes wave {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
</style>

I haven’t really tried everything because yet again i don’t know much Jquery but i’ll pick out the Jquery part,

$(window).on("load",function(){
    $(".wave").fadeOut("slow");
    $(".center").fadeOut("slow");
  });

Linking HTML,CSS to Microsoft Access Database using JavaScript

I have created a webpage which is used to register customers information using html, CSS and JavaScript.
I also have a Microsoft access .mdb file which has few customer information already in it stored in my local computer. (I have html file and MS access file in the same computer and folder)
I want to form a connection between my webpage and mc access so that I can ADD, EDIT/UPDATE and DELETE customer information from it using JavaScript.
I would be grateful if you could show me how to do it. Thanks in advance.
PS. I am a beginner in this field.

I have tried researching my solution but most of them say to use server side programming languages and a different database.

How to listen to messages in the Node.js console?

I am looking to log my console(stdout) messages, generated from my dependencies etc to a storage of mine. Most of the results I found would override the console.log() or spawn a child process which isn’t useful for my use case. I want to listen to every message, error etc.
How can I go about doing this?

EJS Bug Cannot read properties of undefined (reading ‘url’)

I have code to fetch to an api. all the controllers are the same except for their numbers due to being different genres. the ejs view they all use is the exact same. but only two of my methods in controllers actually display to the view the cover.url correctly. every other controller gives me an error Cannot read properties of undefined (reading ‘url’).

only my getFighting and getRts methods display correctly the rest dont

EJS Code

<%- include('./partials/Header.ejs') %> 
<a href="/catagories"><i class="fa-solid fa-circle-left"></i>
<div class="genre-title">
     </a> <h3><%= genreName %> </h3>

</div>
<div class="games-list">
    <div class="genre-games-list">
        <ul>
            <% games.forEach(gameData => { %> 
                <li>
                  
                    <%= gameData.name %>
                    <img src=<%=gameData.cover.url%>  alt="" />
                    
                </li>
              
                <% }) %> 
        </ul>
    </div>
   
    
</div>

Here is my controllers

const fetch = require('node-fetch');
require('dotenv').config();



const Categories = {
    // get genre 
     getGenre(req,res){
    

        const response =  fetch("https://api.igdb.com/v4/genres", {
            method: "POST",
            headers: {
                'Client-ID': process.env.clientid,
                'Authorization': 'Bearer ' + process.env.auth
    
            },
            body: 'fields *;'
        }).then(response => response.json())
        .then(data => {
          console.log(data)
          res.render('catagories', {title: 'catagories', category: data})
        })
        .catch(err => console.log(err.message))
    
       
    },
    getMusic(req,res) {
        const response =  fetch("https://api.igdb.com/v4/games", {
            method: "POST",
            headers: {
                'Client-ID': process.env.clientid,
                'Authorization': 'Bearer ' + process.env.auth
    
            },
            body: 'fields name, cover.url; where genres = (7);'
        }).then(response => response.json())
        .then(data => {
          console.log(data)
          res.render('gamesList', {title: 'Music', genreName: 'Music Games', games: data})
        })
        .catch(err => console.log(err.message))
    
    
    },

    getFighting(req,res) {
        const response =  fetch("https://api.igdb.com/v4/games", {
            method: "POST",
            headers: {
                'Client-ID': process.env.clientid,
                'Authorization': 'Bearer ' + process.env.auth
    
            },
            body: 'fields name, cover.*; where genres = (4);'
        }).then(response => response.json()).then(data => {
          console.log(data)
          res.render('gamesList', {title: 'Music', genreName: 'Music Games', games: data})
        })
        .catch(err => console.log(err.message))
    
    
    },
    
     getPlatform (req,res) {
        const response =   fetch("https://api.igdb.com/v4/games", {
            method: "POST",
            headers: {
                'Client-ID': process.env.clientid,
                'Authorization': 'Bearer ' + process.env.auth
    
            },
            body: 'fields name, cover.*; where genres = (8);'
        }).then(response => response.json()).then(data => {
          console.log(data)
          res.render('gamesList', {title: 'Music', genreName: 'Music Games', games: data})
        })
        .catch(err => console.log(err.message))
    
    
    },
 
 
getRpg (req,res) {
    const response =  fetch("https://api.igdb.com/v4/games", {
        method: "POST",
        headers: {
            'Client-ID': process.env.clientid,
            'Authorization': 'Bearer ' + process.env.auth

        },
        body: 'fields name, cover.*; where genres = (12);'
    }).then(response => response.json()).then(data => {
      console.log(data)
      res.render('gamesList', {title: 'Music', genreName: 'Music Games', games: data})
    })
    .catch(err => console.log(err.message))

},

getRts(req,res)  {
    const response =  fetch("https://api.igdb.com/v4/games", {
        method: "POST",
        headers: {
            'Client-ID': process.env.clientid,
            'Authorization': 'Bearer ' + process.env.auth

        },
        body: 'fields name, cover.*; where genres = (11);'
    }).then(response => response.json()).then(data => {
      console.log(data)
      res.render('gamesList', {title: 'Music', genreName: 'Music Games', games: data})
    })
    .catch(err => console.log(err.message))

},

}

I tried to call to an api and i do get the data object back and it works for only two of my controllers when i try to display the cover.url. the rest of my controllers are unable to display it Cannot read properties of undefined (reading ‘url’)

PHP base64 image data is not in a recognized format imagecreatefromstring()

I have a SVG image, which I converted to SVG using JavaScript:

//transforms svg to base64
let svgString = new XMLSerializer().serializeToString(characterSvg);
let decodedSvg = unescape(encodeURI(svgString));
let ImgBase64 = btoa(decodedSvg);

Using PHP, I tried to convert it as an image:

$data='PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMj [long string, 30-50 kb]';
$newImg = base64_decode($data);
$im = imagecreatefromstring($newImg);

Everything I do it prints this error:

Warning: imagecreatefromstring(): Data is not in a recognized format 

I have removed the data:image/svg+xml;base64, string from the file, but still does not work.
I also tried without base64_decode function call.

I have also pasted my base64 string in this validator: https://base64.guru/converter/decode/image
which displays my image correct.

My PHP version is 7.2+

if I echo the base64 image it also displays the SVG correctly:

base64_decode($newImg);

any alternatives to use the PHP imagefunctions with SVG?

base64 string available here: https://pastebin.com/Hg3MwbF1

I would like to use imagecopymerge to insert an image intro antother

Are there any size limits for the imagecreatefromstring() parameter?

‘client_secret_basic client authentication method requires a client_secret’ | NextAuth

when I try to log in to my NextAuth application with my Google account, I get the following error. I’ve searched everywhere and unfortunately haven’t found a solution. The message is:

'client_secret_basic client authentication method requires a client_secret'

and here is the full error:

[...]
    [next-auth][debug][CREATE_PKCE_CHALLENGE_VERIFIER] {
      pkce: {
        code_challenge: '[i think this is private]',
        code_verifier: '_J--[i think this is private]'
      },
      pkceLength: 64,
      method: 'S256'
    }
    [next-auth][debug][OAUTH_CALLBACK_PROTECTION] {
      state: '[i think this is private]',
      csrfToken: '[i think this is private]'
    }
    [next-auth][debug][GET_AUTHORIZATION_URL] {
      url: '[i think this is private]'    
    }
    [next-auth][error][OAUTH_CALLBACK_ERROR] 
    https://next-auth.js.org/errors#oauth_callback_error client_secret_basic client authentication method requires a client_secret {
      error: {
        message: 'client_secret_basic client authentication method requires a client_secret',
        stack: 'TypeError: client_secret_basic client authentication method requires a client_secretn' +
          '    at Client.authFor (C:\socialmedia2\socialmedia2\node_modules\openid-client\lib\helpers\client.js:105:15)n' +
          '    at Client.authenticatedPost (C:\socialmedia2\socialmedia2\node_modules\openid-client\lib\helpers\client.js:137:30)n' +    
          '    at Client.grant (C:\socialmedia2\socialmedia2\node_modules\openid-client\lib\client.js:1240:46)n' +
          '    at Client.callback (C:\socialmedia2\socialmedia2\node_modules\openid-client\lib\client.js:471:35)n' +
          '    at oAuthCallback (C:\socialmedia2\socialmedia2\node_modules\next-auth\server\lib\oauth\callback.js:90:29)n' +
          '    at processTicksAndRejections (node:internal/process/task_queues:96:5)n' +
          '    at async Object.callback (C:\socialmedia2\socialmedia2\node_modules\next-auth\server\routes\callback.js:50:11)n' +        
          '    at async NextAuthHandler (C:\socialmedia2\socialmedia2\node_modules\next-auth\server\index.js:171:18)n' +
          '    at async C:\socialmedia2\socialmedia2\node_modules\next-auth\server\index.js:251:32n' +
          '    at async Object.apiResolver (C:\socialmedia2\socialmedia2\node_modules\next\dist\server\api-utils\node.js:182:9)',        
        name: 'TypeError'
      },
      providerId: 'google',
      message: 'client_secret_basic client authentication method requires a client_secret'
    }
    [next-auth][error][CALLBACK_OAUTH_ERROR]
    https://next-auth.js.org/errors#callback_oauth_error client_secret_basic client authentication method requires a client_secret TypeError: client_secret_basic client authentication method requires a client_secret
        at Client.authFor (C:socialmedia2socialmedia2node_modulesopenid-clientlibhelpersclient.js:105:15)
        at Client.authenticatedPost (C:socialmedia2socialmedia2node_modulesopenid-clientlibhelpersclient.js:137:30)
        at Client.grant (C:socialmedia2socialmedia2node_modulesopenid-clientlibclient.js:1240:46)
        at Client.callback (C:socialmedia2socialmedia2node_modulesopenid-clientlibclient.js:471:35)
        at oAuthCallback (C:socialmedia2socialmedia2node_modulesnext-authserverliboauthcallback.js:90:29)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
        at async Object.callback (C:socialmedia2socialmedia2node_modulesnext-authserverroutescallback.js:50:11)
        at async NextAuthHandler (C:socialmedia2socialmedia2node_modulesnext-authserverindex.js:171:18)
        at async C:socialmedia2socialmedia2node_modulesnext-authserverindex.js:251:32
        at async Object.apiResolver (C:socialmedia2socialmedia2node_modulesnextdistserverapi-utilsnode.js:182:9) {
      name: 'OAuthCallbackError'
    }

This is my code ([…nextauth].tsx):

import NextAuth from "next-auth";
import GoogleProvider from 'next-auth/providers/google'

export default NextAuth({
// Configure one or more authentication providers
  providers: [
    GoogleProvider({
      clientId: process.env.GOOGLE_CLIENT_ID,
      clientSecret: process.env.GOOGLE_SECRET,
}),
// ...add more providers here
],
pages: {
signIn: "/auth/signin"
},
})

My .env.local:

GOOGLE_CLIENT_ID=[secret]
GOOGLE_CLIENT_SECRET=GOCSPX-[...]
NEXTAUTH_URL="http://localhost:3000/"

What am I doing wrong? Please help me, I’ve been looking for a solution for days! Best wishes!

How to emulate the work of the event “storage” when data should be transferred from a different HTML-file

I created a main HTML page of a calendar. On this page, I added the link to another HTML page for settings. On the settings page, a user has the option to choose the color of the events saved in the calendar. My goal is to make a user’s setting of a color be transferred to the calendar and change the display of its events elements immediately after the color is selected with the help of the input of the type “color” on the settings page. Basically, I need something like the event “storage” when it works for the same page opened in different tabs but in this case I want to deliver the value from the browser local storage to the main page immediately after the change of this value on the settings page. How can I establish an event listener on the main page reacting to the change on another page?

P.S. I need to do it with JavaScript.

this.props.match.params.id in React.js is undefined

I want to get the id from the URL therefore I can use this id to get and output the user info but I can’t get id from URL. I’ve seen useParams() but I think it is not applicable with class component. May I know if there is an alternative solution for this?

 async componentDidMount(){
    const stud_id = this.props.match.params.id;
    console.log(stud_id);
 }

see error message from console here

React Components not Clickable on Page and doesn’t Show up on Inspect

I am improving some features for an existing web site built with ReactJS but on home page I can only click on Body tag, so if I put an onClick event on one of the components, it doesn’t fire up.
Here is an image of what I am trying to say

I am trying to click on buttons in Cards but inspect points Body tag. So, If you face this issue before or know how to fix this please share it here.
Thank you.

How to do automatic refresh every time from a specific time?

I want to combine the functions of the following 2 scripts, for example, the first refresh time is 23:00:00 (need to be accurate to milliseconds), and then refresh every 200 milliseconds, how to do it?

function refreshAt(hours, minutes, seconds) {
    var now = new Date();
    var then = new Date();
 
    if(now.getHours() > hours ||
      (now.getHours() == hours && now.getMinutes() > minutes) ||
        now.getHours() == hours && now.getMinutes() == minutes && now.getSeconds() >= seconds) {
        then.setDate(now.getDate() + 1);
    }
    then.setHours(hours);
    then.setMinutes(minutes);
    then.setSeconds(seconds);
 
    var timeout = (then.getTime() - now.getTime());
    setTimeout(function() { window.location.reload(true); }, timeout);
}
refreshAt(23,00,00); 

timeout=prompt("Set timeout (Second):");
count=0
current=location.href;
if(timeout>0)
setTimeout('reload()',1000*timeout);
else
location.replace(current);
function reload(){
setTimeout('reload()',1000*timeout);
count++;
console.log('every('+timeout+')secondrefresh automatically,refresh times:'+count);
fr4me='<frameset cols='*'>n<frame src=''+current+''/>';
fr4me+='</frameset>';
with(document){write(fr4me);void(close())};
}

Pixi.js how to mask one image with other image

sorry for the amatuer question, I’m really new to Pixi.js

Well, I’m trying to make a scratch card.

There will be two image, one for background(“A”), and one for hidden background( “B” , I think this is mask, but I’m not sure about this terminology , so to avoid confusion I’ll describe as hidden background)

So, image ‘A’ will cover up image ‘B’.

Then, I’will use bristle image for the brush.

When I execute dragging event on Image “A” , I want to show up image ‘B” along path mouse moved.

Sorry , for my terrible description. Think I’m cloning this website ( https://art4globalgoals.com/en )

I followed this example( https://pixijs.io/examples/#/demos-advanced/scratchcard.js ), and succeed to make a brush effect, with only 1 image. But couldn’t implement it with two image.

Precisely speaking , when I run my app, there is black screen rendered , and if I scratch screen, the hidden Image appears.
but the problem is that, I want to set other Image instead of black screen.

below image is my current status , which will happen when running below code
image reveals when I scratch black screen

import * as PIXI from 'pixi.js';

// const canvas = document.getElementById('webgl');

const screenSize = {
    width: window.innerWidth,
    height: window.innerHeight
};
let brushWidth = (window.innerHeight / window.innerWidth) * 200;
let brushHeight = (window.innerHeight / window.innerWidth) * 200;

// canvas.width = screenSize.width;
// canvas.height = screenSize.height;
const app = new PIXI.Application({
    width: window.innerWidth,
    height: window.innerHeight,
    resolution: window.devicePixelRatio,
    autoDensity: true
});

document.body.appendChild(app.view);

app.loader
    .add('background', '/png/effel.png')
    .add('mask', '/png/effel-gray.png')
    .add('bristle1', '/png/brush6.png')
    .add('bristle2', '/png/bristle2.png')
    .load(() => {
        setup();
    });

const setup = () => {
    const brushTexture = app.loader.resources.bristle1.texture;
    const brushTexture2 = app.loader.resources.bristle2.texture;

    const brush = new PIXI.Sprite(brushTexture);
    const brush2 = new PIXI.Sprite(brushTexture2);

    brush.width = brushWidth;
    brush.height = brushHeight;

    brush2.width = brushWidth;
    brush2.height = brushHeight;

    const backgroundTexture = app.loader.resources.background.texture;
    const maskTexture = app.loader.resources.mask.texture;
    const background = new PIXI.Sprite(backgroundTexture);
    background.x = app.renderer.screen.width / 2;
    background.y = app.renderer.screen.height / 2;
    background.anchor.x = 0.5;
    background.anchor.y = 0.5;
    background.width = window.innerWidth;
    background.height = window.innerHeight;

    const Mask = new PIXI.Sprite(maskTexture);
    Mask.width = app.renderer.screen.width;
    Mask.height = app.renderer.screen.height;
    Mask.x = app.renderer.screen.width / 2;
    Mask.y = app.renderer.screen.height / 2;
    Mask.anchor.x = 0.5;
    Mask.anchor.y = 0.5;
    Mask.width = window.innerWidth;
    Mask.height = window.innerHeight;

    // app.stage.addChild(background);
    app.stage.addChild(Mask);

    const renderTexture = PIXI.RenderTexture.create(app.screen.width, app.screen.height);

    const renderTextureSprite = new PIXI.Sprite(renderTexture);

    app.stage.addChild(renderTextureSprite);

    Mask.mask = renderTextureSprite;

    app.stage.interactive = true;
    app.stage.on('pointerdown', pointerDown);
    app.stage.on('pointerup', pointerUp);
    app.stage.on('pointermove', pointerMove);

    let dragging = false;
    let bristle2Render = false;

    function pointerMove(event) {
        if (dragging) {
            brush.position.copyFrom(event.data.global);
            // brushWidth += 0.5;
            // brush.width = brushWidth;

            if (!bristle2Render) {
                setTimeout(() => (bristle2Render = true), 500);
            }

            app.renderer.render(brush, renderTexture, false, null, false);
            if (bristle2Render) {
                brush2.position.copyFrom(event.data.global);
                app.renderer.render(brush2, renderTexture, false, null, false);
            }

            // if (brush.width === 100) {
            //  dragging = false;
            //  brushWidth = 0;
            // }
        }
    }

    function pointerDown(event) {
        dragging = true;
        console.log(11);
        pointerMove(event);
    }

    function pointerUp(event) {
        dragging = false;
        bristle2Render = false;
    }

    window.addEventListener('resize', () => {
        screenSize.width = window.innerWidth;
        screenSize.height = window.innerHeight;

        app.renderer.resize(window.innerWidth, window.innerHeight);
        app.renderer.stage.width = window.innerWidth;
        app.renderer.stage.height = window.innerHeight;
    });
};
// const backgroundTexture = PIXI.Texture.from('/png/effel.png');
// const maskTexture = PIXI.Texture.from('/png/effel-gray.png');

Python: How can I f-string values from multiple brace



`

command = f"""
            var targetDate = {target_date}
            var jcd = "01";
            var callback = arguments[0];
            var target_time = {target_time}
            
            url = '/rsv.selectTimeScd.dp/dmparse.dm';
            data = {{"fRsvD":targetDate, "fJiyukCd":"01"}};
            $('div.rsvTable tbody#rsvTableBody').html("");
            postAjax(url, data, function(result){{
                var timesList = result.times;
                var rowcnt_this = 1;

                for(var i=0; i<timesList.length; i++) {{
                    var rowcnt = timesList[i].rowcnt;
                    var label = timesList[i].rsLabel.replace(":", "시 ") + "분";
                    var btClass = '';

                    console.log(timesList[i].fRsvT.slice(0,2))
                    if (timesList[i].fRsvT.slice(0,2) == target_time)
                    ...

                    if(rowcnt_this == rowcnt)
                        rowcnt_this = 1;
                    else
                        rowcnt_this++;
                }}
                return callback;
            }})
        """
`

I am trying to execute_script in webdriver of selenium. And I need to pass data to multiple lines of string. However, there was multiple brace in the string, thus I replaced “{” into “{{“” However, it doesn’t work at all. How can I change the code in order to execute correctly?

Using values from one react component to create a ternary statement within another component

I’m going to try my best to explain my issue (I’m fairly new to all of this).

For starters. I have a component called LargestSale24H that returns a card with data from an API. Specifically it returns 3 cards; each showing one of 3 of the largest transactions in the last 24 hours. For each transaction it shows the username, user avatar, amount of transaction and date. Here is that return:

if (buyer != null) {
          return (
            <Container key={sale_id}>
              <Card key={buyer}>
                {/* <Badges account={buyer} /> */}
                <UserAvatars user={buyer} />
                <br></br>
                <br></br>
                <Link href={'/user/' + buyer}>
                  <Button>{buyer}</Button>
                </Link>
                <br></br>
                <br></br>
                {salePrice} {listing_symbol}
                <br></br>
                {parseTimestamp(updated_at_time)}
              </Card>
            </Container>
          );
        }

Additionally, I’ve created another component called Badges which is supposed to take each user, in this case buyer, and find all items that they own. This is what the code for badges looks like.

function Badges({ account }) {
  const [assets, setAssets] = useState<Assets>();

  useEffect(() => {
    async function fetchData() {
      const res = await fetch(
        'https://proton.api.atomicassets.io/atomicassets/v1/accounts/' + account
      );
      const { data } = await res.json();
      setAssets(data);
    }
    fetchData();
  }, []);

  if (!assets) {
    return (
      <div>
        <Spinner />
      </div>
    );
  }

  return (
    <ul>
      {assets?.collections?.length > 0 &&
        assets.collections.map((collectionParent, index) => {
          return (
            <li key={index}>{collectionParent.collection.collection_name}</li>
          );
        })}
    </ul>
  );
}

export default Badges;

Currently I have Badges commented out from LargestSale24H, when I bring it back, it lists out all the items that the user has. Items look something like 123456789. I’m listing them out only as a test buy ideally I want to create a ternary statement that says something like “if this account has this item in their collection, return A, else return B”. Incase you are wondering why, it’s because I want to return one time of UserAvatar if they own a specific item, otherwise, I want to keep the one that’s listed.

I tried doing this:

 if (<Badges account={buyer} /> == 523252144314) {
          return (
            <Container key={sale_id}>
              <Card key={buyer}>
                <UserAvatars user={buyer} />
                <br></br>
                <br></br>
                <Link href={'/user/' + buyer}>
                  <Button>{buyer}</Button>
                </Link>
                <br></br>
                <br></br>
                {salePrice} {listing_symbol}
                <br></br>
                {parseTimestamp(updated_at_time)}
              </Card>
            </Container>
          );
        }

Now, I didn’t expect that to work but since I’m still learning all this, I figured I’d give this a try. Normally I would be googling this but I don’t exactly know what I have to do. I know that I’m receiving a list item per buy of what they own, that works fine. But What I need to do is basically go through each item and compare it with what’s in the ternary statement basically deciding if it’s true or false. I just don’t know how to do that. I feel like perhaps listing the values is the incorrect thing to do. Perhaps my logic is incorrect and I should be doing something else.

How to remove the margin/padding of an image?

I am creating a website and am placing an image on the homepage that should cover the entire page. Despite multiple Google searches and attempts, there is still a margin/padding on the top, left, right, and bottom.

Here is my current CSS code for the image:

.tiger-woods-img {
    display: block;
    line-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: auto;
}

This is how the webpage looks with this code (it is hard to see since the background is white, but there is a small margin/padding on all sides of the image):
webpage

I tried to include the following code:

* {
   margin: 0;
   padding: 0;
}

And it worked, but it messed up my navbar.

Is there another solution for this issue?

How do I debug unexpected behaviour with Bootstrap framework?

I have added Bootstrap to my staging site, built using Gatsby.

Something is going wrong with my responsive menu. The code seems to be fine:
enter image description here

And the scripts are loading okay:

enter image description here

But when I click on my button, which correctly appears on a small screen, nothing happens.

How do I debug this to find out what is going wrong? I’m not getting much useful information from Firefox developer tools.