Skip Navigation

[Resolved] Layout with background image

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to use an image from my Media Library as the background of an element.

Solution: Go to Media > Library and click the image you want to use as a background. Find the image's URL, copy and paste that into your CSS:

background-image: url('your-image-url.jpg');
This support ticket is created 6 years, 11 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 7 replies, has 3 voices.

Last updated by massimoS527 6 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#600786
example3.jpg

I created a "creature" layout and was assigned to post-type "creatures".
my problem is to put a background image. (see Attachment)

How can I do ?

thank you

#600923

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Massimo,

Thank you for contacting our support forum.

What you can do is to edit the row for your background and add a class to it.

Then in the Layout css editor you can then assign a background image to that row.

Please let me know if this helps.
Thanks,
Shane

#601163
Screenshot-2017-12-22 Modifica layout ‹ riplove — WordPress.png

I used "Div id" okay or recommend me other tags

<div id="blocco_creatura">
<div id="titolo_creatura">[wpv-post-title]</div>
<div id="prima_foto">[wpv-post-featured-image size="medium"]</div>
<div id="dedica">[types field='dedica'][/types]</div>
<div id="data_decesso">[types field='data-decesso'][/types]</div>
</div>

then I inserted this code into Css and JS of Layout:
I can not align to the center post-featured-image

/*Layouts css goes here*/

#blocco_creatura {

background-image: url('img_flowers.jpg');
background-repeat: no-repeat;
background-size: contain;
}

#titolo_creatura {
text-align:center;
font-size:30px;
margin-left:30px;
margin-bottom:30px;
}

#prima_foto{

border: 1px solid #ddd;
border-radius: 4px;
padding: 5px;
}

#dedica { font-size:25px;
font-style:italic;
margin-top:20px;
text-align:center;
}

#data_decesso {text-align:center; }

#601175

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Massimo,

Where is the image file for the background stored?

Was it uploaded through your wordpress backend ?

Please let me know.
Thanks,
Shane

#601197

backend of wordpress

#601792

Hi, Shane is on vacation so I've been asked to help with this ticket. I hope that's okay with you. It sounds like you want to use an image from your media library as the background of a div:

background-image: url('img_flowers.jpg');

Go to Media > Library and find the image you want to use as the background. Click the image to find the URL. Copy that URL and paste it instead of 'img_flowers.jpg' in the code above.

Please let me know if this works, or if you need additional assistance.

#602257

thanks for the help you have been very precious.

#602332

thanks and sorry if I took you away from time. Holidays are precious, I hope you enjoyed it.

It all works well.