[Resolved] Targeting A Specific Page with CSS

Home Forums Support Targeting A Specific Page with CSS

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #277232
    Tim

    Hello,

    I have a top bar fix position at top=0 which I show on all pages and posts, it is 25px height, so
    I added

    .nav-aligned-right.nav-above-header .main-navigation {
            margin-top: 25px;
    }

    to push my Menu 25px downward

    I need to remove the top bar from a page with ID = 38663, haveing done so I now need to remove the 25px so the Menu sits at the top of my site on this page

    I am trying

    .page-id-38663 .nav-aligned-right.nav-above-header .main-navigation { 
        margin-top: 0 !important; 
    }

    This is not working, you can see here:
    http://aaa.greaterthanthesum.com/sumapp/

    Any help on this is appreciated
    Thanks

    GeneratePress 1.3.44
    #277233
    Leo
    Staff
    Customer Support

    Hi Tim,

    I see this code being added:

    .nav-aligned-right.nav-above-header .main-navigation {
            margin-top: 25px;
    }

    but not this one:

    .page-id-38663 .nav-aligned-right.nav-above-header .main-navigation { 
        margin-top: 0 !important; 
    }

    Otherwise that should work. Try adding that on the top of your CSS editor?

    #277234
    Tim

    Hey Leo, I tried adding it at the top and the bottom of the editor, no luck in either case

    I did get it to work with

    .page-id-38663 #site-navigation { 
        margin-top: 0 !important; 
    }

    unless you tell me this is a bad way to do this, I guess it is working

    Thanks

    #277238
    Leo
    Staff
    Customer Support

    Nope nothing wrong with that!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.