Schuurmudgeon on "[Theme: Make] main div width and spacing to sidebar"

ساخت وبلاگ

Schuurmudgeon
Member
Posted 3 days ago #

Hi!

I'm using a child theme of the Themefoundry's Make.

What I'm struggling with - on computer screen-width - is the spacing between the main id="site-main" and the section id="sidebar-right", as illustrated in the blog index here: http://cluetail.com/en/blog/

I would like the site main to be stretched a bit further to the right, while staying e.g. 20px short of touching the sidebar.

What would be the best way to achieve this, without messing up the layout on smaller screens?

Cheers,
Jos

Hi

Simply add below CSS code to increase width for site-main content.

.has-right-sidebar .site-main, .has-left-sidebar .site-main{ width: 72%;
}

Thanks

Schuurmudgeon
Member
Posted 13 minutes ago #

Thank you codemovement.pk, I tried that. Problem is, when you then make your browser window smaller, and when the sidebar moves under the site-main, the site-main's width appears to stay at 72% of the screen width rather than filling it. Therefore, in terms of mobile-responsiveness, it seems less than ideal.

Cheers,
Jos

Schuurmudgeon
Member
Posted 3 minutes ago #

I added this CSS now:

@media screen and (min-width: 765px) { .has-right-sidebar .site-main, .has-left-sidebar .site-main { width: 72%; }
}

Although I'm not sure if 765px is the exact breaking point...

/ Jos

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 233 تاريخ : يکشنبه 27 تير 1395 ساعت: 21:15