简体   繁体   中英

Custom Template styling in Wordpress Theme

I made a custom template and added a widget area only meant for this custom template. The page with the custom template listens to this .css command.

   body.full-width .site-content
    width=100%

This causes the site-content to push away my sidebar. I would like to have the sidebar next to the content. Right now it is at the right (good) but below the content (bad).

Of course, when I comment out the aforementioned command in my css the page looks great but the rest of my pages (who do use full-width) are logically affected as well...

Can someone help? I have little coding experience...

Thanks,

These were the magic words (to go in my child theme style.css):

    body.page-template-page-templatescustom-php .site-content {
    width: 65.104166667%;
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM