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 Yi Lon Ma
are you using proper dimensions?
View full answer

27 Replies

Avatar
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>
Avatar
@Yi Lon Ma try the normal `<a>` tag for same page linking
Avatar
Blue swimming crab
it says this
Avatar
@Blue swimming crab it says this
Avatar
Blue swimming crab
Image
Avatar
@Blue swimming crab Click to see attachment
Avatar
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?
Avatar
@Yi Lon Ma remove the `/` from it
Avatar
Blue swimming crab
But how are users gonna access it from other pages?
Avatar
@Yi Lon Ma are you using the `Image` tag?
Avatar
Blue swimming crab
yeah let me double check
Image
yeah I am using <Image> for all of them
Avatar
@Blue swimming crab But how are users gonna access it from other pages?
Avatar
yeah in that case you need that
Avatar
@Blue swimming crab yeah I am using <Image> for all of them
Avatar
it is weird that using Image is causing layout shift
Avatar
Blue swimming crab
let me send u another video
Avatar
are you using proper dimensions?
Answer
Avatar
@Yi Lon Ma are you using proper dimensions?
Avatar
Blue swimming crab
Like for the images?
Avatar
yes
Avatar
@Yi Lon Ma yes
Avatar
Blue swimming crab
Let me check that
Avatar
@Yi Lon Ma yes
Avatar
Blue swimming crab
OMGG it seems to be working now!
I think it was that
tysm!
Avatar
:thumbsup:
Original message was deleted
Avatar
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.