The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] nth-child logic – hiddening the first one not working

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #174044

    Hi – I am trying to hide the first link in a navigation.

    The following below will hide the 3rd, 4th and 5th links in a navigation…

    .sm-user-ui a:nth-child(3) {display: none !important;}

    .sm-user-ui a:nth-child(4) {display: none !important;}

    When I add :

    .sm-user-ui a:nth-child(1) {display: none !important;}
    The whole navigation is hidden – ouch !

    therefore, how do a hide the 1st navigation menu item ??

    note : :first-of-type does not work…

    help! thanks :) jerry


    hi – if you notice these two designs are on the same platform (SmugMug).
    I created two themes and within the theme’s css I am hiding navigation menu links depending on the theme. So when viewing a specific, you see a specific color and menu items.
    When you go hide the first one it hides the entire menu.

    thanks – jerry


    bingo!! thank you – big help solving the problem – it is on another site – thanks – jerry

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.