I noticed that this problem has been raised and in the past and apparently fixed, but none of the fixes work for me,
The issue is that I have a background image "umbraco/images/header2.png" - I created the images folder because I don't want this in the editable media folder.
On top of this sits a logo "umbraco/images/logo.png"
The background image is reference in the css file and the logo is referenced in the masterpage.
Basically, the logo is loading fine, but the background image is not.
Within the master page, I have <img src="images/logo.png" height="100" />
In the css I have background-image: url('/images/header2.png') no-repeat;
The image reference in the CSS file is relative to the CSS file. If in doubt try using the full file path to the image (localhost/umbraco/images/header2.png) in the CSS file. Also, try not using apostrophes in the CSS image reference.
/images/header2.png means the file is located inside images folder on site root. since you save the file in /umbraco/images/ then you must write it as /umbraco/images/header2.png
background-image css
Hi all
I noticed that this problem has been raised and in the past and apparently fixed, but none of the fixes work for me,
The issue is that I have a background image "umbraco/images/header2.png" - I created the images folder because I don't want this in the editable media folder.
On top of this sits a logo "umbraco/images/logo.png"
The background image is reference in the css file and the logo is referenced in the masterpage.
Basically, the logo is loading fine, but the background image is not.
Within the master page, I have <img src="images/logo.png" height="100" />
In the css I have background-image: url('/images/header2.png') no-repeat;
I have tried variations of the path
('images/header2.png' , 'umbraco/images/header2.png') etc
When i enter localhost/umbraco/images/header2.png the image loads fine by itself.
Being new to Umbraco, I'm sure that it is something I have done or not done.
Interestingy, I did at one point think it didn't like .png files so I created
a jpeg version and loaded it into the media folder and it still won't load from
there... Can anyone help?
Thanks
Hi Richard,
The image reference in the CSS file is relative to the CSS file. If in doubt try using the full file path to the image (localhost/umbraco/images/header2.png) in the CSS file. Also, try not using apostrophes in the CSS image reference.
Hope this sorts your issue.
Hi Richard,
/images/header2.png means the file is located inside images folder on site root.
since you save the file in /umbraco/images/ then you must write it as
/umbraco/images/header2.png
Cheers,
Ferry
is working on a reply...