SitePoint Sponsor

User Tag List

Results 1 to 14 of 14

Hybrid View

  1. #1
    SitePoint Addict elemental70's Avatar
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    question about hiding divs?

    Hi guys! I'm redoing www.nyraju.com so its more compliant. Now if you take a look at the top menu and click a link you'll be directed to the main page for that sectiona nd simultaneously you'll see a submenu appear. I know I can riv a hidden div, but do I need to do multiple divs for each section? Or can someone point me to a possible faster solution?

    Thanks guys!!

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why do you need to hide elements?

    Just output different sub-navs for each section.

    I'm curious, what do <div>s have to do with it?
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Addict elemental70's Avatar
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you show me an example of what you mean? I thought of it this way b/c as you can see the sub menu only shows up when the main link is clicked?

  4. #4
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by elemental70 View Post
    Could you show me an example of what you mean? I thought of it this way b/c as you can see the sub menu only shows up when the main link is clicked?
    Different sub-navs are coded into each page. (Hopefully server-side includes were used.) This has nothing to do with JavaScript.

    Quote Originally Posted by elemental70 View Post
    Regarding the divs, I'm using the Web Designer's Reference as a , well reference and it looked like it would be a good idea.
    I suggest you learn how semantics apply to X/HTML. Semantics is really a very important subject when it comes to X/HTML.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  5. #5
    SitePoint Addict elemental70's Avatar
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Regarding the divs, I'm using the Web Designer's Reference as a , well reference and it looked like it would be a good idea.

  6. #6
    SitePoint Addict elemental70's Avatar
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not sure what you mean and could really use the help

  7. #7
    SitePoint Addict elemental70's Avatar
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope. The site was totally done is a program called Swish.

  8. #8
    SitePoint Addict elemental70's Avatar
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How would you handle this?

  9. #9
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The main page gets the main menu. Then each section gets a sub-menu in addition to the main menu and all pages in that section get the sub-menu for that section. So two different sections will have different sub-menus.

    I'd do this with some amount of PHP. Here's a tutorial on PHP includes. That site's server might not support PHP though.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  10. #10
    SitePoint Addict elemental70's Avatar
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How would you do this with Javascript?

  11. #11
    SitePoint Addict elemental70's Avatar
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There'd still be the issue of hiding the men till the link was clicked as well.

  12. #12
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's an example of what I've been saying: http://www.dynamicsitesolutions.com/...s-example.html

    I'm curious, why are you so fixated on using JavaScript anyway?

    I recommend you read up on JavaScript Best Practices.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  13. #13
    SitePoint Addict elemental70's Avatar
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Because I'm in a rush, I don't know what the host has and the guy wants it yesterday.

  14. #14
    SitePoint Addict elemental70's Avatar
    Join Date
    Mar 2002
    Location
    Canada
    Posts
    240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And I thought it would be the fastest way


Bookmarks

Posting Permissions

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