does any one have this code
-
Abby
- Verified Member

- Posts: 674
- Joined: July 13th, 2018, 10:04 pm
- Title: No man pays my bills
does any one have this code
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
Thanks for your help
-
Zug
- Banned

- Posts: 418
- Joined: February 11th, 2023, 9:19 am
- Referrals: 4
This would be a great post for the User Group area DESIGNERS & CODERSAbby wrote: ↑March 21st, 2023, 5:30 pmhello 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
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://brand.wwu.edu/how-create-anchor-jump-link
Last edited by Zug on March 21st, 2023, 6:50 pm, edited 1 time in total.
- sarettah
- Verified Member

- Posts: 125
- Joined: January 10th, 2022, 10:39 am
we crossed in posting, lol. I was editing mine and expanding it a touch from my original.
oh well, great minds and all that
oh well, great minds and all that
-
Abby
- Verified Member

- Posts: 674
- Joined: July 13th, 2018, 10:04 pm
- Title: No man pays my bills
Zug wrote: ↑March 21st, 2023, 6:40 pmThis would be a great post for the User Group area DESIGNERS & CODERSAbby wrote: ↑March 21st, 2023, 5:30 pmhello 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
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>https://www.w3schools.blog/anchor-tag-htmlCode: Select all
<div id="contact"></div>
https://brand.wwu.edu/how-create-anchor-jump-link
Thanks now I get it
-
Zug
- Banned

- Posts: 418
- Joined: February 11th, 2023, 9:19 am
- Referrals: 4
No problem ... Except one for me ...Abby wrote: ↑March 21st, 2023, 6:52 pmThanks now I get itZug wrote: ↑March 21st, 2023, 6:40 pmhttps://www.w3schools.blog/anchor-tag-html
https://brand.wwu.edu/how-create-anchor-jump-link![]()
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.
- sarettah
- Verified Member

- Posts: 125
- Joined: January 10th, 2022, 10:39 am
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
- BrasSmonkey
- Verified Member

- Posts: 7893
- Joined: February 28th, 2018, 6:31 pm
- Title: Smell My Sack
- Referrals: 1
- Contact:
canadian abby??
THE LAKEN RILEY ACT IS NOW LAW!!! TRUMP 2025!!!
DACA HAS ENDED!!! email: brassballz-@-techie.com
DACA HAS ENDED!!! email: brassballz-@-techie.com
-
Abby
- Verified Member

- Posts: 674
- Joined: July 13th, 2018, 10:04 pm
- Title: No man pays my bills
sarettah wrote: ↑March 21st, 2023, 9:42 pma 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

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

- Posts: 7893
- Joined: February 28th, 2018, 6:31 pm
- Title: Smell My Sack
- Referrals: 1
- Contact:
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
DACA HAS ENDED!!! email: brassballz-@-techie.com
-
Zug
- Banned

- Posts: 418
- Joined: February 11th, 2023, 9:19 am
- Referrals: 4
Of course ..
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.
Thank you Saretta. I'll be looking into that suggested padding method.
- jag
- Verified Member

- Posts: 6543
- Joined: February 15th, 2018, 9:51 am
- Title: From Malta with love
- Referrals: 1
2 decades ago this was possible before browsers changed things
From Malta with love and sunshine