close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

inline double background

Thread began 6/24/2019 12:44 pm by Jamie | Last modified 6/25/2019 2:23 pm by Jamie | 23 views | 2 replies

Jamie

inline double background

Hi Ray

Not sure if the solution (if there is one) is CSS, JS or PHP so am sorry if this is in the wrong category!

Have created a hero area which needs 2 background images - one that is dynamic and uploaded by the site owner and the other one an overlay (images/misc/heroOverlay.png)

I have had to set it up inline as below as not sure if there is a better way to do it using dynamic content and css? Anyway, the way I have it set I need to be able to hide the overlay image on breakpoints < 480 but as its inline I cant figure out how to do that.



<div class="coffee-span-12 heroContainer<?php if ("".($PageContents->getColumnVal("PageContentsID"))  ."" == "1") { ?> homepage<?php } ?>" style=" <?php if ("".($PageContents->getColumnVal("HeroLarge"))  ."" != "") { ?>background-image: url('plugins/./images/misc/heroOverlay.png'), url('./images/heros/<?php echo($PageContents->getColumnVal("PageImage")); ?>'); background-attachment: scroll, scroll; background-position: right center, right center; background-clip: border-box, border-box; background-origin: padding-box, padding-box; background-size: 50% 100%, cover; background-repeat: no-repeat, no-repeat;<?php } else { ?>  background-image: url('./images/heros/<?php echo($PageContents->getColumnVal("PageImage")); ?>'); background-attachment: scroll; background-position: right center; background-clip: border-box; background-origin: padding-box; background-size: cover; background-repeat: no-repeat;<?php } ?>">


which gives us an output of:

<div class="coffee-span-12 heroContainer homepage" style=" background-image: url('plugins/./images/misc/heroOverlay.png'), url('plugins/./images/heros/bg-motley-slider-content-page.jpg'); background-attachment: scroll, scroll; background-position: right center, right center; background-clip: border-box, border-box; background-origin: padding-box, padding-box; background-size: 50% 100%, cover; background-repeat: no-repeat, no-repeat;">



Thanks

Jamie

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...