- This topic has 3 replies, 2 voices, and was last updated 3 years, 11 months ago by
David.
-
AuthorPosts
-
April 9, 2019 at 11:41 pm #864647
Dan
Hey guys
Appreciate you get a lot of questions about fixing column widths (usually the sidebars) and have read those topics – I think my query is a bit different but apologies if covered else where.
Set Up
– 1360px site width
– three content columns site wide
– Left column – 20%
– Right column – 25%Custom CSS
– Added new @media queries to hide left and right columns below 1360px
– Ideally would fix the main column at around 710px until mobile breakpoint but am struggling the custom CSS with thisWhy
I am sure you are asking why I would want to do this – well I don’t believe content that is placed in right and left columns should wrap below main column at lower screen sizes – the assets in these columns are generally important so instead I hide the right / left columns and introduce the assets into the main column using media queries.I’d like to fix the main column width because right now it scales down unnecessarily when there is plenty of screen real estate either side of it (after left and right columns are hidden) but I also don’t necessarily want it going full width as that means the need to have huge image quality for thumbnails and feature images that I just don’t have access to.
Hoope that all makes sense and you can offer tips on the custom CSS required to fix main column width between the mobile break point and 1359px.
Note – I am building on local host only right now – the url submitted below is running a custom AMP canonical theme.
GeneratePress 2.2.2GP Premium 1.7.8April 10, 2019 at 7:28 am #865105David
StaffCustomer SupportHi there,
so replicating this on a test site, to a) remove the sidebars at 1360px and b) keep the main content to set a set size and centred until we reach tablet breakpoint:
@media (max-width: 1360px) { #left-sidebar, #right-sidebar { display: none; } } @media (max-width: 1360px) and (min-width: 768px) { #content { display: flex; justify-content: center; } #primary { float: none; width: 100%; max-width: 710px; left: 0; } }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/April 10, 2019 at 7:33 am #865107Dan
Awesome – thank you David – perfect!
April 10, 2019 at 7:44 am #865117David
StaffCustomer SupportFirst go that was good lol – glad to be of help 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.