• Resolved marcodifresco

    (@marcodifresco)


    Hi all,
    I am trying to put a text over an image on a WordPress page (it has to be in just one page).

    First the url: https://www.immobiliarepigafetta.it/index.php/ (it’s indeed the home page where I want to do the trick).

    As I found around, I should get it with the following code:

    <div style="text-align: center;background-image:url(IMAGE URL);background-repeat:no-repeat;">
    <p>OVERLAY TEST</p>
    </div>

    As a matter of fact I have adapted for that page:

    <div style="text-align: center;background-image:url(https://www.immobiliarepigafetta.it/media/basilica.jpg);background-repeat:no-repeat;">
    <p>Corso A. Palladio, 89<br />
    36100 Vicenza<br />
    TEL./FAX 0444 543757<br />
    CELL. 320 5728163<br />
    e-mail: [email protected]</p>
    </div>

    But, as you can see, I get only the text and not the image.

    Any idea on how to solve it?

    Thank in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • a background image will not scale to fit the available space; if you look closely, you have two specs of grey dust from the image in the top left area of your content;

    you need to re-size the image manually.

    try to add height:650px; and background-position: center bottom; to your inline style to see the effect.

    Thread Starter marcodifresco

    (@marcodifresco)

    It was absolutely it.

    Thank you very much. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Text over image’ is closed to new replies.