• Resolved shaggyshoogz

    (@shaggyshoogz)


    Hello,

    this probably isn’t solely argent theme related but everyone has always been really helpful in here so I thought I would ask…

    I have created a landing page and hidden 4 elements using custom CSS, but they are all separate code entries, is there a way i can consolidate them all in to one entry? I have tried but they all wipe each other out.

    the only thing i have done to each of them is Display: None

    Ideally id like all 4 elements in one to tidy up my code, is that possible?

    Currently i have them all separate like so;

    .post-795 .entry-header {
    display: none
    }

    .postid-795 .main-navigation {
    display: none
    }

    .postid-795 .site-header {
    display: none
    }

    .postid-795 .saboxplugin-wrap {
    display: none
    }

    .postid-795 .footer-widget-area {
    display: none
    }

    If its not possible no worries.

    Does having a lot of custom CSS slow a site down? I have 164 lines of it now and am concerned.

    Thanks for any help

Viewing 3 replies - 1 through 3 (of 3 total)
  • sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    You can comma separate the selectors like this.

    .post-795 .entry-header, .postid-795 .main-navigation, .postid-795 .site-header, .postid-795 .saboxplugin-wrap, .postid-795 .footer-widget-area, {
    display: none;
    }
    Thread Starter shaggyshoogz

    (@shaggyshoogz)

    Thanks SacredPath, worked a treat!

    • This reply was modified 8 years, 3 months ago by shaggyshoogz.
    sacredpath

    (@sacredpath)

    Automattic Happiness Engineer

    Hooray and you are welcome!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Cleaning up css code in argent’ is closed to new replies.