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 7 of 7
  1. #1
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Menu links vs Body links question

    Hello, please go to:

    http://www.tombraiders.net/katie/rory/index.html

    User: letme
    Pass: in

    I would like the menu links to have a different style than the links in the "body" section.

    How could I do this? The menu is currently controlled by a javascript file, and the style of the webpage is a CSS file.

    Thanks

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Just change the CSS in menu.css.

    What exactly are you having trouble with? And how do you want them to look?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,182
    Thanks
    174
    Thanked 257 Times in 257 Posts
    Yuo could create a class for the body section like...

    Code:
    .style a {
    ........
    }
    
    .style a:hover {
    .......
    ...
    }
    
    
    then wrap it!!
    
    <div class="style">
    link1
    link2
    link3
    </div>
    that would work so that every link in there is set to what u want!!

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts
    Quote Originally Posted by katie_lostsoul View Post
    I would like the menu links to have a different style than the links in the "body" section.

    How could I do this?
    How about:
    Code:
    #page_header li a {…}
    #right_side ul li a {…}
    Quote Originally Posted by katie_lostsoul View Post
    The menu is currently controlled by a javascript file, and the style of the webpage is a CSS file.
    Very bad practice. What if I told you that I have JavaScript disabled because I don’t want anybody to mess around with my browser? I can’t access pages on your site because you rely on JS to create your menu.

    Use progressive enhancement, i.e. create your site so it works completely without any styles and scripts, and then add CSS and JS as enhancements, don’t rely on them for your site to function because you just can’t.

  • #5
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Valid point. How would I go about creating a dropdown menu only in CSS then?

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts
    http://www.htmldog.com/articles/suckerfish/dropdowns/

    (Due to crappy implementation of CSS in IE 6 it’s not completely possible without JS but all modern browsers do it right)

  • #7
    Regular Coder
    Join Date
    May 2004
    Posts
    121
    Thanks
    12
    Thanked 0 Times in 0 Posts
    Awesome thanks, and I actually remembered of another one I used before. Perfect, thanks for reminding me about the JavaScript


  •  

    Posting Permissions

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