Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 292
  • Last Modified:

Sidebar Not Responsive In Studiopress Child Theme

I have a studiopress theme that is responsive but when I display it on smaller screen sizes the right sidebar widens.  It looks fine in a normal desktop size browser window but on tablets and phones it looks bad.

I need to have it look the same as the normal size browser.  That is centered in the sidebar and the side bar not widened.

Pleaee tell me how to fix this problem.

My site is at http://www.thefrugallife.com/wordpress

Attached is a screenshot in a responsive viewer.


Thanks,

Randal
test-responsive-tfl.tiff
0
sharingsunshine
Asked:
sharingsunshine
  • 3
  • 3
1 Solution
 
Scott Fell, EE MVEDeveloperCommented:
It is doing what it is supposed to be doing for a responsive site.  When the screen gets narrow, the divs that where columns will stack to rows.

You will see media queries like this in your css.  You can see under the 2 different scenarios the there are a number of items that are either 300px wide or full 100%.

If you keep the side bar on a small screen, it would have to be so tiny (including the font) it would not be seen.  Although the choice of media query widths seem different than what I am used to, this is common practice for responsive.  
media="all"
@media only screen and (max-width: 1139px)
.footer-widgets-1, .footer-widgets-2, .footer-widgets-3, .sidebar-primary, .title-area {
width: 300px;
}

media="all"
@media only screen and (max-width: 1023px)
.content, .content-sidebar-sidebar .content, .content-sidebar-sidebar .content-sidebar-wrap, .footer-widgets-1, .footer-widgets-2, .footer-widgets-3, .sidebar-content-sidebar .content, .sidebar-content-sidebar .content-sidebar-wrap, .sidebar-primary, .sidebar-secondary, .sidebar-sidebar-content .content, .sidebar-sidebar-content .content-sidebar-wrap, .site-header .widget-area, .title-area {
width: 100%;
}

Open in new window

0
 
sharingsunshineAuthor Commented:
I understand they stack to rows but when I look at other sites with a 3 column layout the images in the sidebars and the sidebars themselves are all centered so they look good.

Additionally, the images aren't resizing to a smaller screen and they aren't staying centered either.

So what should I change the media query css to?

Thanks,
0
 
Scott Fell, EE MVEDeveloperCommented:
Ok, I understand now.

Add this css to your child theme below anything else.  The images are in a div with class textwidget.
.textwidget img{
   text-align:center;
}

Open in new window

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
sharingsunshineAuthor Commented:
I put the code in and nothing has changed.
0
 
Scott Fell, EE MVEDeveloperCommented:
Try
.textwidget{
   text-align:center;
}

Open in new window

0
 
sharingsunshineAuthor Commented:
that's great, thanks for your help.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now