Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

HTML links wont work

  • 24-01-2017 08:24PM
    #1
    Closed Accounts Posts: 191 ✭✭


    Hi i am having an extremely frustrating problem, when i move my links they will not work anymore? Anyone ever experience this. My code is ...
    [HTML]
    <body>
    <div id="wrapper">
    <header>
    <nav>
    <ul class="mainNav">
    <li><a href=""> Home </a></li>
    <li><a href="">Shop </a></li>
    <li><a href="">Newest </a></li>
    <li><a href=""> About </a> </li>
    <li><a href=""> Sale </a></li>
    <li><a href="">Login </a></li>
    </ul>
    [/HTML]

    [HTML]
    .mainNav li{
    display: inline;
    position: relative;
    left: 700px;
    top: 25px;
    word-spacing: 19px;
    text-decoration: none;
    color: black;

    }

    a{
    text-decoration: none;
    display: inline;
    color: black;
    position: relative;
    bottom:

    }

    .mainNav li {
    display: inline;


    }

    .mainNav li a:hover{
    color: red;

    }

    .mainNav li a:visited{
    text-decoration: none;
    }
    [/HTML]

    Answer would be great as im going crazy over this it appears they stop working when the logo is positioned straight accross from it? Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 10 monpog13


    you have not linked them to anything so when you click them they are static, i.e not moving to a new page is this what you mean?

    <a href="some link here">Home</a>

    etc


  • Closed Accounts Posts: 191 ✭✭chocolate boy123


    No I ment it wouldn't even be clickable like it was a paragraph or something funny enough I solved it soon after posting but I'm sure I'll run into more problems and I'll post back again!


  • Closed Accounts Posts: 191 ✭✭chocolate boy123


    My HR will not show? I have tried everything like changing height, colour etc is there any other way do do a straight line across? Need to put it over my footer? Thanks


  • Registered Users, Registered Users 2 Posts: 6,272 ✭✭✭Buford T Justice


    In your CSS
    hr {
      border: 1px solid black;
    }
    
    


  • Closed Accounts Posts: 191 ✭✭chocolate boy123


    I have done that too, the line appears but it appears up down instead of across have tried in sublime and notepad and still not working


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 6,272 ✭✭✭Buford T Justice


    Post your code


  • Closed Accounts Posts: 191 ✭✭chocolate boy123


    I have it sorted now, thanks!


  • Closed Accounts Posts: 191 ✭✭chocolate boy123


    Last question i promise lol. My nav bar is
    [HTML]
    <nav>
    <ul class="mainNav">
    <li><a href=""> Home </a></li>
    <div class="dropdown">
    <button class="dropbtn">Product</button>
    <div class="dropdown-content">
    <a href=""> Hoodies and Jumpers </a>
    <a href=""> Sweatpants and Jeans </a>
    <a href=""> T-shirts and Shirts</a>
    <a href=""> Outfits for him</a>
    <a href=""> Outfist for her</a>
    </div>
    </div>
    <li><a href="">Newest </a></li>
    <li><a href=""> About </a> </li>
    <li><a href=""> Sale </a></li>
    <li><a href="">Login </a></li>
    </ul>
    </nav>
    [/HTML]


    Jquery is
     // Fading of nav bar dropdown
      $('.dropdown').hover(function(){ 
       $(this).children("ul").stop().fadeIn("slow");
       },
       function(){
             $(this).children("ul").stop().fadeOut("slow");   
    });
    

    Can ye help me make it work for the dropdown to fade in and out!


Advertisement