Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2015
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts

    What am i doing wrong?

    i made a link from the secondary page to the main page, both are in the same place, in the same folder, when i click nothing happens.

    <a href="index.html" target="_blank">index</a>

    did i miss something?

  2. #2
    New Coder
    Join Date
    Jul 2015
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i managed to understand why it did not work, but i still do not know why.

    <a class="smooth-scroll" href="index.html" target="_self"> index </a>

    i have this thing:
    class = "smooth-scroll" - when it's without it it works, and i need it, what do i do?

  3. #3
    New Coder
    Join Date
    Jul 2015
    Posts
    29
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No matter, I fixed it (I think), thanks anyway

  4. #4
    Senior Coder deathshadow's Avatar
    Join Date
    Feb 2016
    Location
    Keene, NH
    Posts
    3,505
    Thanks
    4
    Thanked 503 Times in 491 Posts
    target="_blank" creates a new window, you can't smooth scroll to something on a NEW window.

    target="_self" should only be used if you're using framesets, which SHOULD be unlikely since this is 2018 not 1998.

    Though really we were told to stop using target="" ENTIRELY since it's accessibility crap -- just like frames -- some twenty years ago. Stop shoving new windows down users gullets whether they like it or not. There's a reason it was removed from HTML 4 Strict, and it's REALLY stupid they let it back into HTML 5.
    “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.” – C.A.R. Hoare, The 1980 ACM Turing Award Lecture
    http://www.cutcodedown.com


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •