Forums

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
    Posts
  • #174044
    jerryr125
    Participant

    https://css-tricks.com/how-nth-child-works/

    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 .sm-page-widget-nav-popover.sm-page-widget-nav-color-default a:nth-child(3) {display: none !important;}

    .sm-user-ui .sm-page-widget-nav-popover.sm-page-widget-nav-color-default a:nth-child(4) {display: none !important;}

    When I add :

    .sm-user-ui .sm-page-widget-nav-popover.sm-page-widget-nav-color-default 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

    #174057
    jerryr125
    Participant

    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.

    http://www.vanessak.com/CharlestonAerials/Home
    http://www.vanessak.com/

    thanks – jerry

    #174060
    jerryr125
    Participant

    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.