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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Apr 2005
    Posts
    315
    Thanks
    18
    Thanked 2 Times in 2 Posts

    ID vs. Class . . .

    REF: http://chieftainclothing.com/mockup/

    On my page I have two places I use for navigation, the top and the bottom. I get error messages because I cannot use an ID more than once. How do I make the navigation usable at both ends? I think I can use a .class, but I'm not quit sure how to code it.

    Any suggestions?
    Last edited by michael180; 07-13-2011 at 04:23 AM.

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Your URL didn't work for me. However you change the # to a . in your CSS and then change the attribute from id to class.

    An element can have an ID and a class. But you can't have two elements with the same ID on a page.
    OracleGuy

  • Users who have thanked oracleguy for this post:

    michael180 (07-13-2011)

  • #3
    Regular Coder
    Join Date
    Apr 2005
    Posts
    315
    Thanks
    18
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by oracleguy View Post
    Your URL didn't work for me. However you change the # to a . in your CSS and then change the attribute from id to class.

    An element can have an ID and a class. But you can't have two elements with the same ID on a page.
    I think I fixed the link, it seems to take a while to load? I still get the errors. I'm just not sure if it works as part of navigation.

    Thanks

  • #4
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    something wrong with the link, you can google and find the right solution, things like realm name or sth else.

  • #5
    Regular Coder
    Join Date
    Apr 2005
    Posts
    315
    Thanks
    18
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by oracleguy View Post
    Your URL didn't work for me. However you change the # to a . in your CSS and then change the attribute from id to class.

    An element can have an ID and a class. But you can't have two elements with the same ID on a page.
    It worked.

    Thanks much . . .


  •  

    Posting Permissions

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