CSS stylesheet and background image not displayed anymore
Asked by Bruno Miretti:

Hi,

I have several pages using CSS style sheets and for around 2 weeks now, I have an issue with background images that are not displayed anymore (whereas this worked for several months)

I've inserted a CSSstylesheet macro and added this:

```
div.portalpicture {color:black; background-color:#0a71b4; background-repeat:no-repeat; background-position:50% 50%; background-image:url("https://stromasys.atlassian.net/wiki/download/attachments/15794334/website-bg01.png"); }
```

Then later I just insert a div macro using the portalpicture class but I've got only the background color, no more image. Any idea ?

I've already contacted Atlassian Support but they say the problem is related to your macro.

Thanks

Best regards

Bruno


Answers:
author: Steffen Heller
body: When I try it works with or without blank lines in Firefox, IE and Chrome.

So perhaps your problem really has to do with that upgrade!?


author: Bruno Miretti
body: Hi Steffen,

sorry, couldn't answer yesterday, I haven't enough points to do so (that's illogical... how to resolve an issue with 3 answers max per 24h ?)

I've received more news from Atlassian support and of course, there's another bug introduced with the latest upgrade, see [CONF-38578.](https://jira.atlassian.com/browse/CONF-38578)

Thanks for your help.

comments: author: Steffen Heller
body: Okay, so good luck for a quick bug fix ;-)


author: Bruno Miretti
body: Hi, thanks that's the first thing I checked and you can see from the example I gave this image can be read.

I'd say nothing has changed except Atlassian upgraded the Confluence Cloud version. I also just come to create a blank page with that code, added a div macro with portalpicture class and added several blank lines inside the div box and... well.. that works in preview, not after saving and displaying the page :smile:

Tried with IE11 and Firefox


author: Bruno Miretti
body: As I said, add several blank lines inside the div macro, this will display the picture and not only one line.

![information](/html/@4DF2F60CA30FBCA0CD7B960B5D0F871B/images/emoticons/information.png "information") I use this div macro in order to adjust the image to the window size and that worked as I expected. This worked for months until that Confluence upgrade 2 weeks ago.


author: Steffen Heller
body: Just to be sure:

You are aware that your div with the background image looks like this (correctly!) ?

2015-07-27 15_15_00-Seitenname - Steffen Heller - Lightweb.png

In other words, there isn't much more than a blue background colour. But that is not a fault but just the way the image looks like (when squashed to such a small height!):   
<https://stromasys.atlassian.net/wiki/download/attachments/15794334/website-bg01.png>

[](https://community.atlassian.com/t5/Confluence-questions/CSS-stylesheet-and-background-image-not-displayed-anymore/qaq-p/304988?attachment-id=9320){#link_1191e110800629}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/51493/1/2015-07-27%2015_15_00-Seitenname%20-%20Steffen%20Heller%20-%20Lightweb.png){#display_1191e110800629_0}


author: Steffen Heller
body: Hi,

when I use your code it works. It creates a small strip with the image as background.

If the image does not appear I would first check if the image is still there, if the url is correct and if nothing else has been changed.


Tags: addon-com.adaptavist.confluence.contentformat

cloud

confluence-cloud