CSS: #Primary #Secondary ändern. Aber nur, wenn es eine WooCommerce Seite ist!

  • Hallo Leute,

    Bin gerade dabei, meine Seite ein wenig anzupassen.
    Nun habe ich aber ein Problem:
    Ich will das Primary/Secondary auf width:100 setzen, damit die "Sidebar" unter dem Shop erscheint.
    Das soll eben nur passieren, wenn es sich auch wirklich um dem Shop handelt.

    Habe es so probiert:

    PHP
    .page-id-140 .div#primary {
        float: left;
        width: 100%;
    } 
    .page-id-140 .div#secondary {
        float: right;
        width: 100%;
    }

    Leider ohne Erfolg :-(

    Kann sich das mal jemand ansehen?

    Seite:
    http://bit.ly/2E87gpv

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

  • Hallo,

    probiere es einmal mit folgenden CSS Code:

    CSS
    [COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]page[/FONT][/COLOR][COLOR=#007700][FONT=monospace]-[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]id[/FONT][/COLOR][COLOR=#007700][FONT=monospace]-[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]140 [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]div[/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]#primary {
        [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]float[/FONT][/COLOR][COLOR=#007700][FONT=monospace]: [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]left !important[/FONT][/COLOR][COLOR=#007700][FONT=monospace];
        [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]width[/FONT][/COLOR][COLOR=#007700][FONT=monospace]: [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]100[/FONT][/COLOR][COLOR=#007700][FONT=monospace]% !important;
    } 
    .[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]page[/FONT][/COLOR][COLOR=#007700][FONT=monospace]-[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]id[/FONT][/COLOR][COLOR=#007700][FONT=monospace]-[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]140 [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]div[/FONT][/COLOR][COLOR=#FF8000][FONT=monospace]#secondary {
        [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]float[/FONT][/COLOR][COLOR=#007700][FONT=monospace]: [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]right !important[/FONT][/COLOR][COLOR=#007700][FONT=monospace];
        [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]width[/FONT][/COLOR][COLOR=#007700][FONT=monospace]: [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]100[/FONT][/COLOR][COLOR=#007700][FONT=monospace]% !important;
    }  [/FONT][/COLOR]

    LG

  • Habe es jetzt hinbekommen:

    PHP
    /*Bei WC die Kategorien unten anzeign*/
    .left-sidebar-layout #primary {
        float: left;
        width: 100%;
    }
    .left-sidebar-layout #secondary {
        float: right;
        width: 100%;
    }

    Aber danke nochmals :-)

  • Das war es doch nicht :-(
    Leider wird in den Unterkategorien der "Shariff" nicht angezeigt.
    Dies tritt komischerweise nur im Live System auf.
    http://bit.ly/2s5rFai

    Wenn ich es im Shop normal draufgehe, wird er angezeigt :-/

    Es scheint so, als wenn er "nach unten rutscht".

    Jemand einen Rat?

  • Wenn du es nur für den Shop haben willst, bediene dich der Classes aus dem Body, z. B. so

    .woocommerce #primary, .woocommerce #secondary { ..... }

    Das Geheimnis des Könnens liegt im Wollen!
    [size=12]Bitte keine Hilfegesuche per PN (auch keine "privaten" Links). Das ist ein öffentliches Forum.[/SIZE]

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!