Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Parallax HTML codeParallax HTML code
Previous
 
Next
New Post
3/16/2018 11:36 AM
 
Hi,

I wanted to put a nice piece of parallax HTML/CSS code into the HTML module to produce that effect.
Found an example on the net and tested it in Expression 4 then pasted it into the HTML section of the module.,
slipped to design mode and - still in the editing mode of the module - it worked fine.

It doesn't work when I save and exit to the page.

Here is the [psuedo] code:


"<"  style type="text/css"">"
.parallax1 {
    /* The image used */
    background-image: url('http://blah-blah/.png');
    /* Full height */
    height: 100%;

    /* Create the parallax scrolling effect */
    background-attachment: fixed;    background-position: center;    background-repeat: no-repeat;    background-size: cover;
}
I then put the style section into the Page Tags, but no improvement... Anyone any ideas??
Regards, Duncan
 
New Post
3/19/2018 12:39 PM
 
I would use the developer tools in your browser to debug this. My guess would be that the css is not being applied correctly. You'll have to look and see if you can figure out why not.



Joe Craig
Patapsco Research Group, Ellicott City, MD
DotNetNuke Development and Services (http://patapscorg.com)
 
New Post
3/19/2018 2:14 PM
 

First thing I see is that you are missing a closing style tag (</style>). The other thing is why all the quotes? You only need to quote the "text/css".

 

If it were me I would add your html to the html module. Then add the css including the style tags in the module header.

 

<style type="text/css">
.parallax1 {
    /* The image used */
    background-image: url('http://blah-blah/.png');
    /* Full height */
    height: 100%;

    /* Create the parallax scrolling effect */
    background-attachment: fixed;    background-position: center;    background-repeat: no-repeat;    background-size: cover;

}

 

</style>

 
New Post
3/19/2018 5:57 PM
 
You're also using a height of 100%. That won't work unless you set the html document and the html body to 100% also. Working with height percentages are very difficult in css.
 
New Post
3/20/2018 5:44 PM
 

Apologies, muddeatr

This was intended to be 'pseudo code' to provide a general idea of the shape of the code as I thought that 'actual code' wasn't allowed in these forums...

The actual code - which I've now put into a separate html page and redirected the target page through settings, works fine, [but so far, not on mobile devices... still working on that...]
As I wanted a 'simple' page with particular effects, and CMS didn't apply in this case, this was the work-around.

With regard to the "100%" comment, that does actually work.

Thanks for all the feedback.

 

 

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Parallax HTML codeParallax HTML code


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out