Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-08-2013, 10:32 PM   PM User | #1
wasniewc
New to the CF scene

 
Join Date: Feb 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
wasniewc is an unknown quantity at this point
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?
wasniewc is offline   Reply With Quote
Old 02-09-2013, 08:23 PM   PM User | #2
COBOLdinosaur
Regular Coder

 
COBOLdinosaur's Avatar
 
Join Date: Jul 2002
Location: Canada
Posts: 298
Thanks: 1
Thanked 18 Times in 18 Posts
COBOLdinosaur is an unknown quantity at this point
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&
COBOLdinosaur is offline   Reply With Quote
Old 02-12-2013, 02:42 PM   PM User | #3
wasniewc
New to the CF scene

 
Join Date: Feb 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
wasniewc is an unknown quantity at this point
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
wasniewc is offline   Reply With Quote
Old 02-13-2013, 06:42 PM   PM User | #4
COBOLdinosaur
Regular Coder

 
COBOLdinosaur's Avatar
 
Join Date: Jul 2002
Location: Canada
Posts: 298
Thanks: 1
Thanked 18 Times in 18 Posts
COBOLdinosaur is an unknown quantity at this point
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&
COBOLdinosaur is offline   Reply With Quote
Old 02-13-2013, 07:29 PM   PM User | #5
wasniewc
New to the CF scene

 
Join Date: Feb 2013
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
wasniewc is an unknown quantity at this point
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.
wasniewc is offline   Reply With Quote
Old 02-13-2013, 08:16 PM   PM User | #6
COBOLdinosaur
Regular Coder

 
COBOLdinosaur's Avatar
 
Join Date: Jul 2002
Location: Canada
Posts: 298
Thanks: 1
Thanked 18 Times in 18 Posts
COBOLdinosaur is an unknown quantity at this point
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&
COBOLdinosaur is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:58 AM.


Advertisement
Log in to turn off these ads.