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 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Feb 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS issue with sub-menu when html file in seperate folder

    I'm using a bootstrap and style css sets with a standard navbar for a menu structure.

    When these conditions exist, everything works great.
    css are in a folder called "css".
    javascripts are all in a folder called "js".
    html are all in the root.

    When i add a folder to the root called "projects" to further organize the html files and i change all links to js and css in the files in that folder to have "../" in front. Everything works great except the sub-menus in the NavBar do not work at all.

    again everything (format wise and java script wise) works great except the sub-menu drop down items when the html file is in a separate folder in the site root.

    Simplified code:
    Code:
    <div class="navbar">
    <ul class="nav sf-menu">
    <li class="sub-menu"><a href="A.html">A</a>
           <ul>
                  <li><a href="1.html">1</a></li>
                  <li><a href="2.html">2</a></li>
                  <li><a href="3.html">3</a></li>
                  <li><a href="4.html">4</a></li>
                  <li><a href="5.html">5</a></li>
           </ul>
    </li>
    </ul>
    </div>
    any ideas?

  • #2
    Regular Coder COBOLdinosaur's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Without a link to the page there is no way for us to see what is going on.
    100% standards compliant code is 100% correct 100% of the time.
    one of my toys from my repository and perhaps some help getting help

    Cd&

  • #3
    New to the CF scene
    Join Date
    Feb 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Link to sample page in root folder - sub menu drop items work fine
    http://www.robertshvac.com/temp/test/adjeovj/news.html

    Link to sample page in folder within root with all links dennotes "../" and everything works but the sub-menu drop items.
    http://www.robertshvac.com/temp/test.../wackerdr.html

  • #4
    Regular Coder COBOLdinosaur's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    The links in http://www.robertshvac.com/temp/test/adjeovj/news.html

    All assume that the target pages are in the same directory. If they are not, then you need to include the path in the href location.
    100% standards compliant code is 100% correct 100% of the time.
    one of my toys from my repository and perhaps some help getting help

    Cd&

  • #5
    New to the CF scene
    Join Date
    Feb 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know the links don't work. I just posted these 2 pages to a temporary location so you could access them. At this point i am only trying to get the CSS and Java to work, as you will see the css and java are referenced properly on both pages and the drop down menu in the nav bar does not work on one page and works fine on the other.

  • #6
    Regular Coder COBOLdinosaur's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    The directory structure eludes me. That second link is above or below the target pages that are a problem?
    100% standards compliant code is 100% correct 100% of the time.
    one of my toys from my repository and perhaps some help getting help

    Cd&


  •  

    Posting Permissions

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