- This topic has 7 replies, 2 voices, and was last updated 3 years, 8 months ago by
David.
-
AuthorPosts
-
August 23, 2018 at 8:56 am #658027
Viktor
Is there a way to insert image at a full width of the inside-article container, overwriting margins?
See the screenshot
Thanks
GP Premium 1.7.2August 23, 2018 at 9:26 am #658065David
StaffCustomer SupportHi there,
you can try this by adding a full size image in a wrapper with this class:
.wide-image-wrapper { margin-left: -40px; /* change PX to match container padding */ width: calc(100% + 80px); /* change to 2x container padding */ }
You could apply it directly to the img itself but WP has a habit of wrapping it in a P tag, which messes things up.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 24, 2018 at 9:09 am #659020Viktor
David,
thanks, it works for me with small modifications:
.wide-image-wrapper {
max-width:calc(100% + 124px);
margin-left: -62px;
}https://www.staging.phototraces.com/deconstructing-photo/hiking-in-kodachrome-utah/
Now, I am facing another issue. In the mobile view, the image is 124px wider than a width of the device.
Any ideas?
August 24, 2018 at 9:19 am #659030David
StaffCustomer SupportThats great, try some media queries to adjust for mobile, something like so:
/* Desktop */ @media (min-width: 769px) { .wide-image-wrapper { max-width: calc(100% + 124px); margin-left: -62px; } } /* Mobile */ @media (max-width: 768px) { .wide-image-wrapper { max-width: calc(100% + 40px); margin-left: -20px; } }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 24, 2018 at 9:25 am #659033Viktor
Dave,
I am still new to GP, so I probably have a dumb question.
When I customize CSS globally, which customization section do I use? Simple Custome CSS, Simple CSS or Additional CSS?
Thanks
August 24, 2018 at 9:41 am #659042David
StaffCustomer SupportOh my thats a lot ๐
I would keep them all in one place.
Additional CSS is added by WP Core so.
Simple CSS (by Tom) is super and my choice if i am not using a Child Theme.The Simple Custom CSS i haven’t used but that plugin doesn’t do as much as Simple CSS so i would probably remove that.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 24, 2018 at 11:11 am #659100Viktor
Thanks, guys,
With your help, I managed to switch from Genesis to GP without too much hassle.
and this is the speed I got at a first try without any optimization:
simply WOW
August 24, 2018 at 11:45 am #659119David
StaffCustomer SupportIts always great to see what people are building with on GP. And thats a great looking site ๐
haha yes, it is phenomenal how fast you can build a site and how fast it is.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.