does any one have this code

Discussion Of All Legal Topics Is Fine Anything Goes. Be Respectful of Others. No Personal Information or Attacks.
All Traffic, Link, Banner, Push Notification and Advertising, Offers & Requests Here,.
Domains & Websites For Sale and Requests Here.
Keep One thread per person & No More Than 1 Weekly Bump.
Post Reply
Abby
Verified Member
Verified Member
Posts: 674
Joined: July 13th, 2018, 10:04 pm
Title: No man pays my bills

does any one have this code

#1

Post by Abby » March 21st, 2023, 5:30 pm

hello what i want is the code so when a person clicks on a link on my site it jumps to the right place on a page. Example if they click "Contact" it will take them to the part f a page where the contact information is instead of them having to scroll down the page to find it.

Thanks for your help




User avatar
sarettah
Verified Member
Verified Member
Posts: 125
Joined: January 10th, 2022, 10:39 am

#2

Post by sarettah » March 21st, 2023, 6:37 pm

if you have an element with an id of contact (<div id="contact"> or somesuch) it would be:

<a href="#contact">Contact</a>

like that
Last edited by sarettah on March 21st, 2023, 6:44 pm, edited 1 time in total.

Zug
Banned
Banned
Posts: 418
Joined: February 11th, 2023, 9:19 am
Referrals: 4

#3

Post by Zug » March 21st, 2023, 6:40 pm

Abby wrote: ↑
March 21st, 2023, 5:30 pm
hello what i want is the code so when a person clicks on a link on my site it jumps to the right place on a page. Example if they click "Contact" it will take them to the part f a page where the contact information is instead of them having to scroll down the page to find it.

Thanks for your help
This would be a great post for the User Group area DESIGNERS & CODERS

I believe you are looking for a 'page jump' type of link. Otherwise called a page anchor.

Code: Select all

<a href="https://domain.com/contact-us/index.html#contact">Contact Us</a>

Code: Select all

<a href="#contact">Contact Us</a>

Code: Select all

<div id="contact"></div>
https://www.w3schools.blog/anchor-tag-html
https://brand.wwu.edu/how-create-anchor-jump-link
Last edited by Zug on March 21st, 2023, 6:50 pm, edited 1 time in total.




User avatar
sarettah
Verified Member
Verified Member
Posts: 125
Joined: January 10th, 2022, 10:39 am

#4

Post by sarettah » March 21st, 2023, 6:46 pm

we crossed in posting, lol. I was editing mine and expanding it a touch from my original.

oh well, great minds and all that

Abby
Verified Member
Verified Member
Posts: 674
Joined: July 13th, 2018, 10:04 pm
Title: No man pays my bills

#5

Post by Abby » March 21st, 2023, 6:52 pm

Zug wrote: ↑
March 21st, 2023, 6:40 pm
Abby wrote: ↑
March 21st, 2023, 5:30 pm
hello what i want is the code so when a person clicks on a link on my site it jumps to the right place on a page. Example if they click "Contact" it will take them to the part f a page where the contact information is instead of them having to scroll down the page to find it.

Thanks for your help
This would be a great post for the User Group area DESIGNERS & CODERS

I believe you are looking for a 'page jump' type of link. Otherwise called a page anchor.

Code: Select all

<a href="https://domain.com/contact-us/index.html#contact">Contact Us</a>

Code: Select all

<a href="#contact">Contact Us</a>

Code: Select all

<div id="contact"></div>
https://www.w3schools.blog/anchor-tag-html
https://brand.wwu.edu/how-create-anchor-jump-link



Thanks now I get it bf5d2b6s




Zug
Banned
Banned
Posts: 418
Joined: February 11th, 2023, 9:19 am
Referrals: 4

#6

Post by Zug » March 21st, 2023, 7:28 pm

Abby wrote: ↑
March 21st, 2023, 6:52 pm
Thanks now I get it bf5d2b6s
No problem ... Except one for me ...
sarettah wrote: ↑
March 21st, 2023, 6:46 pm
... great minds and all that
34ddww

:?: .. If you use a page jump/anchor tag while using a sticky header/fixed/menu/ the height of that sticky is not compensated. So when you hit a page jump with a sticky menu it does not jump to the exact id area.

I would be interested in the css fix for this as I have been looking for it. I know it is a simple little piece of code, but it escapes the se's. It's a padding adjustment for anchor tags .. or something. It's been a while.

An example of my problem is here. The top line of links are all anchored links within the page. But when you hit one, the header height is not added to where the anchor actually goes. It's off by about 50px.




User avatar
sarettah
Verified Member
Verified Member
Posts: 125
Joined: January 10th, 2022, 10:39 am

#7

Post by sarettah » March 21st, 2023, 9:42 pm

Zug wrote: ↑
March 21st, 2023, 7:28 pm
An example of my problem is here. The top line of links are all anchored links within the page. But when you hit one, the header height is not added to where the anchor actually goes. It's off by about 50px.
a fix would be to make the hrs have an id tag for the section and then make the information divs have a padding-top of like 30px

you have:

<hr class="py-1 text-hr-color">
<div id="about"></div>
<h2 class="display-6 text-light-blue">About Web Model Portal</h2>

That would become:

<hr id="about" class="py-1 text-hr-color">
<div style="padding-top:30px;"></div>
<h2 class="display-6 text-light-blue">About Web Model Portal</h2>

that would make your info divs look a touch different but in testing i thought they looked ok.

or you could like i said make the hrs have the id, get rid of the empty div and change the class "display-6 text-light-blue" have a padding-top of about 30px and get the same effect i think

User avatar
BrasSmonkey
Verified Member
Verified Member
Posts: 7893
Joined: February 28th, 2018, 6:31 pm
Title: Smell My Sack
Referrals: 1
Contact:

#8

Post by BrasSmonkey » March 22nd, 2023, 3:13 am

canadian abby??
THE LAKEN RILEY ACT IS NOW LAW!!! TRUMP 2025!!!
DACA HAS ENDED!!! email: brassballz-@-techie.com

Abby
Verified Member
Verified Member
Posts: 674
Joined: July 13th, 2018, 10:04 pm
Title: No man pays my bills

#9

Post by Abby » March 22nd, 2023, 3:59 am

sarettah wrote: ↑
March 21st, 2023, 9:42 pm
Zug wrote: ↑
March 21st, 2023, 7:28 pm
An example of my problem is here. The top line of links are all anchored links within the page. But when you hit one, the header height is not added to where the anchor actually goes. It's off by about 50px.
a fix would be to make the hrs have an id tag for the section and then make the information divs have a padding-top of like 30px

you have:

<hr class="py-1 text-hr-color">
<div id="about"></div>
<h2 class="display-6 text-light-blue">About Web Model Portal</h2>

That would become:

<hr id="about" class="py-1 text-hr-color">
<div style="padding-top:30px;"></div>
<h2 class="display-6 text-light-blue">About Web Model Portal</h2>

that would make your info divs look a touch different but in testing i thought they looked ok.

or you could like i said make the hrs have the id, get rid of the empty div and change the class "display-6 text-light-blue" have a padding-top of about 30px and get the same effect i think


We were in old Pasadena bar hoping and just Uber’ed back home at 1am it is best I leave the code on my blog alone.




GlennfromLA
Verified Member
Verified Member
Posts: 1218
Joined: September 4th, 2019, 11:01 pm

#10

Post by GlennfromLA » March 25th, 2023, 12:22 pm

So many sites set it up wrong and the page jump never works




User avatar
BrasSmonkey
Verified Member
Verified Member
Posts: 7893
Joined: February 28th, 2018, 6:31 pm
Title: Smell My Sack
Referrals: 1
Contact:

#11

Post by BrasSmonkey » March 25th, 2023, 3:28 pm

im thinking tabby... i don't know this bitch...
THE LAKEN RILEY ACT IS NOW LAW!!! TRUMP 2025!!!
DACA HAS ENDED!!! email: brassballz-@-techie.com

Zug
Banned
Banned
Posts: 418
Joined: February 11th, 2023, 9:19 am
Referrals: 4

#12

Post by Zug » March 25th, 2023, 7:28 pm

Abby wrote: ↑
March 22nd, 2023, 3:59 am
We were in old Pasadena bar hoping and just Uber’ed back home at 1am it is best I leave the code on my blog alone.
Of course .. r6d10k

Since we're talking about code, 'does any one have this code' ...

A guy is using ChatGPT to turn $100 into a business making 'as much money as possible.' Here are the first 4 steps the AI chatbot gave him.
sarettah wrote: ↑
March 21st, 2023, 9:42 pm
Thank you Saretta. I'll be looking into that suggested padding method.




User avatar
jag
Verified Member
Verified Member
Posts: 6543
Joined: February 15th, 2018, 9:51 am
Title: From Malta with love
Referrals: 1

#13

Post by jag » March 31st, 2023, 6:41 am

2 decades ago this was possible before browsers changed things
From Malta with love and sunshine

does any one have this code

Post Reply