Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jamie 6 posts 76 karma points
    Feb 02, 2018 @ 17:02
    Jamie
    0

    Background Image not showing on web page

    Hi,

    I have been driving myself crazy trying to figure this out and nothing is working!

    I am trying to add a background image to my website, a STANDARD PAGE document type has been set up with a 'PAGE IMAGE' property using the 'Umbraco.Textbox' where I want to paste my image URL such as:

    style="height: auto; width: 100%; background: url('/media/1434/microsoft-dynamics-365.png'); background-position: center; background-position-y: 500px; background-attachment: fixed;"

    When I try to link this property to the STANDARD PAGE TEMPLATE, it doesn't seem to be working, I have tried everything I can think of, including inserting an UMBRACO PAGE FIELD and selecting the related field ‘pageImage'.

    This is what my current STANDARD PAGE template looks like:

    STANDARD PAGE TEMPLATE

    And this is what it looks like from the CONTENT section:

    CONTENT SECTION

    The image is not outputting at the front end of my website, can anyone help!?

  • Mila Pandurska 43 posts 190 karma points
    Feb 02, 2018 @ 20:12
    Mila Pandurska
    0

    Hi, Jamie, What is the output from this line Umbraco.Fields("pageImage")? You need to "attach" this style to an element - for example <div @Umbraco.Fields("pageImage")>....</div> which will results as:

    <div style="height: auto; width: 100%; background: url('/media/1434/microsoft-dynamics-365.png'); background-position: center; background-position-y: 500px; background-attachment: fixed;">...</div>
    

    In addition I noticed that you have "<" in the begging of the textfield Page Image which may cause some problems.

    Mila

  • Jamie 6 posts 76 karma points
    Feb 05, 2018 @ 09:42
    Jamie
    0

    Hi Mila,

    Thank you so much for your help, between the info you gave and a little tweaking I managed to sort it! :)

Please Sign in or register to post replies

Write your reply to:

Draft