1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

CSS vs Javascript for sites menu

Discussion in 'CSS' started by fadetoblack22, Oct 25, 2008.

  1. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #21
    That's not a CSS problem, that's a retarded browser problem (one of many unfortunately). Easily worked around however (and Javascript uses CSS to write background images, so it doesn't act any differently)
    SEMrush
     
    rochow, Oct 26, 2008 IP
    SEMrush
  2. fadetoblack22

    fadetoblack22 Well-Known Member

    Messages:
    2,332
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #22
    Yep, I realise that. IE is rapidly falling behind other browsers. If it wasn't included in windows, then they would have a much smaller market share.
     
    fadetoblack22, Oct 26, 2008 IP
  3. garrettheel

    garrettheel Peon

    Messages:
    341
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #23
    Fixed it for you
     
    garrettheel, Oct 26, 2008 IP
  4. fadetoblack22

    fadetoblack22 Well-Known Member

    Messages:
    2,332
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #24
    lol. I certainly haven't used IE for about 8 years.
     
    fadetoblack22, Oct 27, 2008 IP
  5. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #25
    Many schools and companies with "big networks" stick with what they have to avoid constantly upgrading and having to fix things if they break, which often is XP with IE6. So the actual people using it have no control over it - which is why all these people who run around saying "who cares about supporting it, its their own fault for using IE6" are idiots.
     
    rochow, Oct 27, 2008 IP
  6. fadetoblack22

    fadetoblack22 Well-Known Member

    Messages:
    2,332
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #26
    and IE6 is the most risky to use because:

    1) it is the most popular so most people hack it.
    2) they don't tell you about updates like FF, Opera etc... so no one installs them. although they may actually be done with the windows updates.

    now lets get back to the thread topic ;)
     
    fadetoblack22, Oct 27, 2008 IP
  7. feha

    feha Active Member

    Messages:
    1,005
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    80
  8. fadetoblack22

    fadetoblack22 Well-Known Member

    Messages:
    2,332
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #28
    fadetoblack22, Oct 28, 2008 IP
  9. crowdadmin

    crowdadmin Guest

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #29
    ... or a combination of both...

    Older JS (and flash) were quite invisible or unparsable by the search engines (remember never to use AJAX for this). Trough some newer have no such a problems.

    I'm using a MooMenu for freelancercrowd.com and it works just nice for me.
     
    crowdadmin, Oct 28, 2008 IP
  10. Dimmo

    Dimmo Well-Known Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    126
    #30

    If you can use php then you can get your links highlighted as active depending on the current page your on:

    http://www.sebastiansulinski.co.uk/web_design_tutorials/css/active_button.php
     
    Dimmo, Oct 28, 2008 IP
  11. fadetoblack22

    fadetoblack22 Well-Known Member

    Messages:
    2,332
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #31
    fadetoblack22, Oct 28, 2008 IP
  12. Dimmo

    Dimmo Well-Known Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    126
    #32
    yes you can do it that way as well. It just switches the active class automatically.
     
    Dimmo, Oct 28, 2008 IP
  13. fadetoblack22

    fadetoblack22 Well-Known Member

    Messages:
    2,332
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    160
    #33
    sorry I only skimmed over the page before. yes it is a better way. thanks.
     
    fadetoblack22, Oct 28, 2008 IP
  14. Dimmo

    Dimmo Well-Known Member

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    126
    #34
    In fact this was what I was actually meaning to link to:

    http://www.pegor.com/tutorials-how-to/php-mysql-tutorials/highlight-current-active-navigation-link-step-1-xhtml-and-css

    So if say you have a tab called : Sports and content pages : Football and Golf

    Then when you create the football page, you would still like the sports tab to be active so you would just define the football page as :

    <?php
    define('THIS_PAGE', 'sport');
    ?>

    and it would set the active class dynamically.

    This is so you don't you have to keep changing the class for each and every page you create.
     
    Dimmo, Oct 28, 2008 IP
  15. garrettheel

    garrettheel Peon

    Messages:
    341
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #35
    Basically what they're trying to say is that you only need to make use of a server side language if you're already keeping the menu in another file and including it on each page. E.g..

    
    
    $page = "Contact";
    
    include("header.php");
    
    
    Code (markup):
    By doing this , I can set $page variable in the menu to add an active class to the contact menu item.
     
    garrettheel, Oct 28, 2008 IP