Skip Navigation

[Resolved] I want to show featured image as width

This support ticket is created 5 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by indianplayschools 5 years, 2 months ago.

Assisted by: Waqar.

Author
Posts
#1324045

I have created a content template using the block editor. I am able to display the custom post type as desired. But, how can I change the featured image to show full width?
hidden link
Above is the link to the page which shows the custom post type. Please let me know how to show the featured image full width. It looks very small on mobile with a lot of left and right margin.
I am using divi theme.
Thank you

#1324075

Hi there,

Thank you for contacting us and I'd be happy to assist.

To make the inner content element like featured image, cover the full-screen width, you'll need some custom CSS code.

Example:

You can wrap your image's code inside a div with a special class "full-width-special":


<div class="full-width-special">
Featured Image's code
</div>

And then include the CSS code for this class:
( source: hidden link )


.full-width-special {width: 100vw;position: relative;left: 50%;right: 50%;margin-left: -50vw;margin-right: -50vw;}

html { overflow-x: hidden }

I hope this helps.

regards,
Waqar

#1324165

My issue is resolved now. Heartful Thank you for the detailed code.