-Home (id=`1`) -Section (id=`3`) ---Article (id=`4`) -CSS (id=`72`) ---CSS file1 (id=`73`) ---CSS file2 (id=`74`)
div.advertising {
display: block;
text-align: center;
background-image: url(/[[!getResourceField? &id=`1` &field=`mainSideAdMobile` &processTV=`1` &isTV=`1`]]);
content:'';
background-size: 100%;
background-repeat:no-repeat;
}<link rel="stylesheet" href="[[~73]]" type="text/css" media="all"> <link rel="stylesheet" href="[[~74]]" type="text/css" media="screen and (min-width: 720px)">
This question has been answered by sottwell. See the first response.
<style type="text/css">
@media
{
div.advertising {
background-image: url(/[[!If?
&subject=`[[!getResourceField? &id=`[[*parent]]` &field=`mainSideAdMobile` &processTV=`1` &isTV=`1`]]`
&operator=`isempty`
&then = `[[!getResourceField? &id=`1` &field=`mainSideAdMobile` &processTV=`1` &isTV=`1`]]`
&else =`[[!getResourceField? &id=`[[*parent]]` &field=`mainSideAdMobile` &processTV=`1` &isTV=`1`]]`
]]);
}
}
@media screen and (min-width: 720px) {
div.advertising {
background-image: url(/[[!If?
&subject=`[[!getResourceField? &id=`[[*parent]]` &field=`mainSideAd720` &processTV=`1` &isTV=`1`]]`
&operator=`isempty`
&then = `[[!getResourceField? &id=`1` &field=`mainSideAd720` &processTV=`1` &isTV=`1`]]`
&else =`[[!getResourceField? &id=`[[*parent]]` &field=`mainSideAd720` &processTV=`1` &isTV=`1`]]`
]]);
}
}
</style>