Copied to clipboard

Flag this post as spam?

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


  • Ellie 17 posts 52 karma points
    Apr 04, 2014 @ 11:22
    Ellie
    0

    background image in css not shown

    I have a css file  in stylesheet folder and I have an image in the  Media / Images folder

    I am trying to use the image as a background image for footer but the image not shown in footer as a background image.

    I have tried many way to show the image but it doesn't work.

    I have tried thses:

    umbraco/Media/Images/bgimgfooter.png

    umbraco/Media/Images/1165

    umbraco/Media/Images/1165/bgimgfooter.png

    Media/Images/bgimgfooter.png

    Media/bgimgfooter.png

     

    Media/Images/1165

    Media/Images/1165/bgimgfooter.png

    .footer {

        background-color:#292832;

        background-image:url('Images/bgimgfooter.png');

        background-position:top center;

        background-repeat:no-repeat;

        width:100%; 

    }

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 04, 2014 @ 11:32
    Dennis Aaen
    0

    Hi Ellie and welcome to our.

    How about this:

    .footer {
       background-color:#292832;
       background-image:url('/media/1165/bgimgfooter.png');
       background-position:top center;
       background-repeat:no-repeat;
       width:100%;
    }

    Now I can see that is a background image for the footer on your site. If the user not should change it, I could be a good idea to locate site graphic outside the Umbraco media library, Then you will be sure that some users not delete your site graphic, such as header graphic or footer graphic. Logo could be a good idea to make changeable for the user.

    If you want to do like this you could make a folder beside the umbraco folders (css, masterpages, and so on) called e.g frontend. In this folder you could keep the page graphic that the user not should change.

    Hope this helps,

    /Dennis

  • Ellie 17 posts 52 karma points
    Apr 04, 2014 @ 11:44
    Ellie
    0

    Thank you for reply , nop doesn't show

    I am using Umbraco 7

    a part from uploading the image in media/Images folder do I need to do anything else?

     

     

     

  • Ellie 17 posts 52 karma points
    Apr 04, 2014 @ 11:48
    Ellie
    0

    I am not surehow do you mean but I have master page as well and I have tried this as wellbut again backgroung image doesn't show.

        <div style="background-color:#292832;background-image:url('/media/1165/bgimgfooter.png');background-position:top center;background-repeat:no-repeat;
        width:100%; ">  

     
    <umbraco:Macro Alias="Footer" runat="server"></umbraco:Macro>


        </div>

     

    Thanks for your help

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 04, 2014 @ 11:53
    Dennis Aaen
    0

    Hi Ellie,

    How about this:

    .footer {
       background
    -color:#292832;
       background
    -image:url('/media/1165/bgimgfooter.png');
       background
    -position:top center;
       background
    -repeat:no-repeat;
       width
    :100%;
       height: 100%;
    }

    And make sure that the id of the image is correct. You can get the path to the image, by go the media library click on the image, then you will see a preview of the image.

    When you clicked on the preview, you will get the path to the image. Did you see my addition to my first comment.

    Hope this helps,

    /Dennis

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 04, 2014 @ 11:53
    Jan Skovgaard
    0

    Hi Ellie

    Can you access the image you're trying to display by going to the frontend of your website adding /media/1165/bgimgfooter.png?

    So something like http://yourdomain.com/media/1165/bgimgfooter.png

    /Jan

  • Ellie 17 posts 52 karma points
    Apr 04, 2014 @ 12:00
    Ellie
    0

    Hi Jan,

    No I can't ,

    Server Error :

    404 - File or directory not found.

    The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

     

     

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 04, 2014 @ 12:06
    Dennis Aaen
    0

    Hi Ellie,

    Try go to the media library and find the bgimgfooter.png image. When you´re on the image, you will see a preview of it. Then you can get the path to the image by click on the image.

    You can also see the id of the image under the properties tab.

    I have made a screenshot where to find the id of the image.

    Hope this helps,

    /Dennis

  • Ellie 17 posts 52 karma points
    Apr 04, 2014 @ 12:09
    Ellie
    0

    ok now I can accessto the image

    http://www.lffadmin.co.uk/media/1036/bgimgfooter.png

    But still it doesn't show the  image

    .footer {
        background-color:#292832;
        background-image:url('media/1036/bgimgfooter.png');
        background-position:top center;
        background-repeat:no-repeat;
        width:100%;
        height:100%;
    }

  • Ellie 17 posts 52 karma points
    Apr 04, 2014 @ 12:11
    Ellie
    0

    id in property tab is different from the Url when I click on Image

    id in property tab is 1165 while the url is  media/1036/bgimgfooter.png

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Apr 04, 2014 @ 12:15
    Dennis Aaen
    100

    Hi Ellie,

    I can see that you´re missing the / before media.Therefore you get no background image.

    So it should look like this:

    .footer {
        background-color:#292832;
        background-image:url('/media/1036/bgimgfooter.png');
        background-position:top center;
        background-repeat:no-repeat;
        width:100%;
        height:100%;
    }

    /Dennis

  • Ellie 17 posts 52 karma points
    Apr 04, 2014 @ 12:18
    Ellie
    0

    heyyyyyyyyyyyyyyyyyyyyyy thank you Dennis you are right

Please Sign in or register to post replies

Write your reply to:

Draft