- This topic has 13 replies, 4 voices, and was last updated 3 years, 11 months ago by
David.
-
AuthorPosts
-
June 9, 2019 at 7:02 am #924057
Anil
Hi
Please advice
how to do height of last div in right sidebar to match the content column in desktop view, so it looks nice….
Regards.
June 9, 2019 at 10:19 am #924193Anil
Can we have a flexible height of last div in right sidebar to match the height of main content ?
June 9, 2019 at 10:23 am #924198Tom
Lead DeveloperLead DeveloperHi there,
Try this CSS:
.site-content { display: flex; } .inside-right-sidebar { display: flex; flex-direction: column; height: calc(100% - 40px); } .inside-right-sidebar > aside:last-child { flex-grow: 1; }
June 9, 2019 at 6:09 pm #924365Anil
Thanks Tom, it worked with media quary:
@media (min-width: 769px) { .site-content { display: flex; } .inside-right-sidebar { display: flex; flex-direction: column; height: calc(100% - 40px); } .inside-right-sidebar > aside:last-child { flex-grow: 1; } }
June 9, 2019 at 6:10 pm #924366Anil
Also, can you please advise to have same grid space between footer widget 1 and footer widget 2…
June 9, 2019 at 6:53 pm #924384Leo
StaffCustomer SupportSomething like this?
https://generatepress.com/forums/topic/separated-footer-container/June 9, 2019 at 7:08 pm #924396Anil
Thanks Leo, it works with slight tweak
@media (min-width: 769px) { #footer-widgets { padding: 0; background-color: transparent; } .site-footer .footer-widgets-container .inside-footer-widgets { margin: 0; } .site-footer .footer-widgets-container .inner-padding { padding: 0; } .inside-footer-widgets>div { width: calc(50% - 10px); } .inside-footer-widgets>div:first-child { margin-right: 10px; padding: 20px; background-color: #fff; } .inside-footer-widgets>div:last-child { margin-left: 10px; padding: 20px; background-color: #fff; } }
June 9, 2019 at 7:11 pm #924398Anil
Also can you please advise to have grid space between footer widget 1 and footer widget 2 when width is less than 769 because at width 768 footer widgets re-aligned in a column….
June 9, 2019 at 8:08 pm #924410Leo
StaffCustomer SupportHave you figured it out?
I see a space between them:
https://www.screencast.com/t/yAGgvuifB4cFJune 9, 2019 at 8:22 pm #924416Anil
Yes Leo, it is working now with following css:
@media (max-width: 768px) { #footer-widgets { padding: 0; background-color: transparent; } .site-footer .footer-widgets-container .inside-footer-widgets { margin: 0; } .site-footer .footer-widgets-container .inner-padding { padding: 0; } .inside-footer-widgets>div:first-child { margin-bottom: 10px; padding: 20px; background-color: #fff; } .inside-footer-widgets>div:last-child { padding: 20px; background-color: #fff; } } @media (min-width: 769px) { #footer-widgets { padding: 0; background-color: transparent; } .site-footer .footer-widgets-container .inside-footer-widgets { margin: 0; } .site-footer .footer-widgets-container .inner-padding { padding: 0; } .inside-footer-widgets>div { width: calc(50% - 5px); } .inside-footer-widgets>div:first-child { margin-right: 5px; padding: 20px; background-color: #fff; } .inside-footer-widgets>div:last-child { margin-left: 5px; padding: 20px; background-color: #fff; } }
Only issue remaining is footer widget height…. i think display:flex is creating it ….
Can you suggest some tweak….
June 9, 2019 at 8:32 pm #924420Anil
I checked that following css is to be tweaked:
@media (min-width: 769px) { #footer-widgets { padding: 0; background-color: transparent; } .site-footer .footer-widgets-container .inside-footer-widgets { margin: 0; } .site-footer .footer-widgets-container .inner-padding { padding: 0; } .inside-footer-widgets>div { width: calc(50% - 5px); } .inside-footer-widgets>div:first-child { margin-right: 5px; padding: 20px; background-color: #fff; } .inside-footer-widgets>div:last-child { margin-left: 5px; padding: 20px; background-color: #fff; } }
June 10, 2019 at 5:42 am #924697David
StaffCustomer SupportHi there,
by making the footer container a flex should resolve that – something like this:
.inside-footer-widgets { display: flex; }
You will need to include within your media queries for desktop only.
June 10, 2019 at 7:51 am #924947Anil
Thanks David, it worked.
My observation: “Tom and David are experts in css”
Regards & Bye.
June 10, 2019 at 7:59 am #924959David
StaffCustomer SupportGlad we could be of help.
-
AuthorPosts
- You must be logged in to reply to this topic.