• How can I add a padding top only to archive pages to the following:

    @media only screen and (min-width: 769px){  #secondary{width:25%;
        float:left;  
    padding-left:20px;
        padding-right:20px;
     }
        }

    I wrote a second similar css using .archive #secondary but it doesnt work

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • You mentioned “archive pages”, and yet you provided the URL of a single post.

    To make your CSS code work on archive pages ONLY, simply change #secondary to .archive #secondary — everything else remains the same.

    Thread Starter sacconi

    (@sacconi)

    sorry I meant only on post pages, sidebar

    Moderator bcworkz

    (@bcworkz)

    Check the page’s body tag for useful class attributes that are unique to the page you want to target. Use that class instead of .archive like George suggested. For example .single-post #secondary

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding a padding top only to archive pages’ is closed to new replies.