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

    Unhappy HTML/CSS Menu, Active Page

    Hello there!
    I've been trying to fix this problem all day, and I just can't seem to get it right.
    I'm hoping somewhere knows the obvious answer to this
    Here's a link to my website.

    This website is a project for school. They told me I could use Dreamweaver or the like, but hell, where's the learning in that, right? One of the conditions of the website is that I must make use of frames, which is why I can't find a way around this problem.

    The problem:
    I would like to have the menu-button to the corresponding active page, to have a different color, as to indicate on which page the user is on.
    Here's a link to a website I made with Wix.com as a previous project, showing the desired effect.
    The problem is of course, that the Index.html consists of 2 pages: menu.html and *.html. If you're to click a link in menu.html, it will give you a page in the framename "content". I'm having a lot of trouble visualizing this interframe linking, if I may call it so. Preferably I'd like to fix this issue without the use of JavaScript.

    Either way, I hope to have been specific enough. I'd be glad to get advice on this

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,441
    Thanks
    11
    Thanked 305 Times in 304 Posts
    Quote Originally Posted by formergenius View Post
    One of the conditions of the website is that I must make use of frames...
    This is like when dads force their young son to smoke a cigarette, hoping that it will taste so awful that he won't ever touch one again. It may work, I don't know... interesting teaching method though!

    Unfortunately I'm not aware of a solution to your situation within the boundaries you have. Was it a requirement from the teacher that the buttons change color, or is that your own addition to the scope?

    Dave

  • #3
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by tracknut View Post
    This is like when dads force their young son to smoke a cigarette, hoping that it will taste so awful that he won't ever touch one again. It may work, I don't know... interesting teaching method though!
    Sigh, well I understand how it works. But if I'm not mistaken frames are seriously outdated?

    Unfortunately I'm not aware of a solution to your situation within the boundaries you have. Was it a requirement from the teacher that the buttons change color, or is that your own addition to the scope?
    And no, it was my own addition. I have a deadline for Monday. Maybe I should stop focussing on the details. Did you find the rest of the programming coherent?

    Thanks for the reply

  • #4
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is like when dads force their young son to smoke a cigarette, hoping that it will taste so awful that he won't ever touch one again. It may work, I don't know... interesting teaching method though!
    Indeed, if I'm not mistaken, the use of frames is somewhat out of date.
    Then again, it's just the orientation part of the study, I haven't yet chosen Application Developing as my study.

    Unfortunately I'm not aware of a solution to your situation within the boundaries you have. Was it a requirement from the teacher that the buttons change color, or is that your own addition to the scope?
    No, it was my own addition. I was aiming for this site to have the same features as the WYSIWYG site I made, not identical per se. Guess I'll have to ignore this bit, deadline is due Monday.

    Thanks for looking into it anyway Does the programming seem coherent, or do you know a better/easier way to approach this? With which I mean the CSS script for the buttons.

  • #5
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, quotes don't seem to work for me here.
    Anyway, indeed I beleive frames are somewhat outdated if I'm not mistaken.
    And no, it was my own addition. I intended to make the website with the same features as the WYSIWYG version I made, not necessarily identical. Anyway, guess I'll have to skip this. Deadline is due Monday. Thanks anyway for taking a look. Any comments on how I scripted the CSS menu? By this I mean, did I make it too complicated?

    Cheers.

    EDIT: I'm tired, ignore the excess 'anyways'

  • #6
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,441
    Thanks
    11
    Thanked 305 Times in 304 Posts
    On your frameset page, keep in mind the doctype must be the first line, first char. So move your comments down below at least the first line. Then in your menu.html file, you also use a frameset doctype, when it is not a frameset. That should use the same doctype you're using for the content pages (html 4.01 strict, probably) which I can't see, I'm assuming you haven't built them yet.

    On quick glance the navigation looks decent enough to me.

    Dave

  • #7
    New Coder
    Join Date
    Sep 2012
    Location
    Boulder, CO
    Posts
    56
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Frames are really outdated...don't torchure yourself!

    Suggestion: Layout your page putting the main navigation towards the top of your page or you can put it off to the left hand side of your page...these are very common ways to layout your main navigation.

  • #8
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    @Dave
    thanks for noticing that, I will change the doctype's accordingly.
    No I haven't built them in yet, just made the link to test the hover script.

    @fireplace_tea
    I was considering letting go of the frames. Then I would make a page-templet for each page with the menu in the body. And then use iframe.... ohh wait nevermind that won't work.

    I'll just skip this for now. What is usually the relation between menu and content on most websites? Big websites like About.com can't possibly be having a huge menu script on each template? Can anyone maybe point me to a simple website, with a similar layout so I can take a glance at the script? I'll continue working on my website this way, I'm just interested to know for any future websites.

  • #9
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,441
    Thanks
    11
    Thanked 305 Times in 304 Posts
    Typically the menu code is put into a separate file and included via a server side include into the html. Looking at it from a browser's 'view source' it would appear that the menu was literally typed in to each page of the site, but it's not done manually, it is the server include that's doing it as the page is pushed to the browser. If you have php on your system, it's as simple as putting this:
    <?php
    include ('menu.inc');
    ?>
    into your page where the menu belongs. It could be done with your current site. Then each page will focus on the topic of interest, and just have the menu pasted at the top.

    Dave


  •  

    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
    •