Skip Navigation

[Résolu] I want to show featured image as width

This support ticket is created Il y a 5 années. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par indianplayschools Il y a 5 années.

Assisté par: Waqar.

Auteur
Publications
#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?
lien caché
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: lien caché )


.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.

Ce ticket est maintenant fermé. Si vous êtes un client de Toolset et que vous avez besoin d'aide, veuillez ouvrir un nouveau ticket d'assistance