Next.js Discord

Discord Forum

Scroll not working with DIV ID

Answered
Blue swimming crab posted this in #help-forum
Open in Discord
Original message was deleted.
Answered by @ts-ignore
are you using proper dimensions?
View full answer

27 Replies

Blue swimming crab
It also happens in mobilephones when they try to access the vote section thru the menu
          <Link
              href="/#vote-section"
              className="font-inter rounded-lg lg:px-6 lg:py-4 lg:hover:text-rose-800"
            >
              Vote
            </Link>
<span id="vote-section" className="relative flex justify-center">
        <div className="absolute inset-x-0 top-1/2 h-px -translate-y-1/2 bg-transparent bg-gradient-to-r from-transparent via-gray-500 to-transparent opacity-75"></div>

        <div className="relative z-10 bg-zinc-900 px-6"> Vote</div>
      </span>
@@ts-ignore try the normal `<a>` tag for same page linking
Blue swimming crab
it says this
@Blue swimming crab it says this
Blue swimming crab
@Blue swimming crab Click to see attachment
remove the / from it
and I think this is happening due to your images loading later
causing layout shift
are you using the Image tag?
@@ts-ignore remove the `/` from it
Blue swimming crab
But how are users gonna access it from other pages?
@@ts-ignore are you using the `Image` tag?
Blue swimming crab
yeah let me double check
yeah I am using <Image> for all of them
@Blue swimming crab But how are users gonna access it from other pages?
yeah in that case you need that
@Blue swimming crab yeah I am using <Image> for all of them
it is weird that using Image is causing layout shift
Blue swimming crab
let me send u another video
are you using proper dimensions?
Answer
@@ts-ignore are you using proper dimensions?
Blue swimming crab
Like for the images?
yes
@@ts-ignore yes
Blue swimming crab
Let me check that
@@ts-ignore yes
Blue swimming crab
OMGG it seems to be working now!
I think it was that
tysm!
:thumbsup:
Original message was deleted
Asian black bear
@Blue swimming crab Please don't delete your original question as this thread has now lost context. In the future attribute helpers as described in the embed using a marked solution.