Grow your CSS skills. Land your dream job.

Js Background slider behind content

  • # March 18, 2013 at 5:50 am

    Hello.

    I am just working with a new idea that I have got but don’t know how to make the background slider go behind content. I already have a body with fixed image. just would like the script to go on top of current body but behind content http://codepen.io/mwbcomputers/pen/nELim

    Is there some way i can add styles with z-index in the Java Script I am not to sure how to add it? or where it goes.

    # March 18, 2013 at 7:37 am

    I’m not sure what I’m looking at with that codepen…

    With jQuery it’s easy to add z-index though: `$(‘img’).css(‘z-index’, -1);`

    # March 18, 2013 at 7:40 am

    Sliding Images behind content is a poor UX/UI idea….IMO

    Quite possibly you will render your content unreadable.

    # March 18, 2013 at 7:52 am

    I know this is going to sound wacky (and I have no idea if it will work) BUT,,,

    …could you add the existing body background image to the [html] element and the apply the rotating/sliding bg image to the body?

    Can you do that?

    Obviously, you would need JS/JQ to swap out the body background but it shouldn’t be impossible…should it?

    # March 18, 2013 at 8:17 am

    I have worked it out my testing store http://mwbtheme01.mwbcomputers.com.au/

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".