Text with background image
-
Hey,
how can i create a block with image + centered txt ?
ex. http://www.ruggierodesantis.com/site/wp-content/uploads/2017/01/bg-trees-4.jpgis it possible with lay features?
Best -
hey pizzarrone
I'm writing your idea down and will work on making it a feature one day.
Right now you could do this with some css.
Go to your gridder and right click your textblock where you have your centered text.
By resizing the element in the gridder, give it a good width so your text has a lot of space in that box. Now right click your textbox and for "space top" and "space bottom" enter "20" for example.Now your textbox will look kind of like this:
Now right click the textbox and choose "Set HTML class and id". As the "class" enter: textbox1
Save your project.
Go to your media library, click on an image and copy the url from the info box that has opened.Now go to "Lay Options" -> "Custom CSS & HTML"
In "Custom <head> content" enter:
<style> .textbox1{ background-image: url("http://laytheme.dev/wp-content/uploads/2017/01/ruine_recens_L7_1104.jpg"); background-size: cover; } </style>
Of course my url to my image http://laytheme.dev/wp-content/uploads/2017/01/ruine_recens_L7_1104.jpg should be replaced by your url to your image.
-
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it