December 20, 201312 yr Hi, a couple weeks back i asked a question on how to re-size an image in a type of "parallax container http://www.webdesignerforum.co.uk/topic/72755-website-resizing-help/. Unbeknownst to me i was causing another issue for myself, which aesthetically ruining the site in a mobile setting. Now my question is, how do i re-size an image for the desktop and then change it back to the the original mobile size constraints when opened in a mobile setting. Here is the my newly adjusted parallax code... <!--start parallax 1--> <div id="parallax-1" class="parallax fixed" style="background-image: url(images/parallax-1.jpg); background-size: 100%;"> <div class="quoteWrap"> <div class="quote"> <div class="container"> <div class="sixteen columns"> <h3><span class="largeBold">Intelligence</span> <span class="large">without ambition</span> <br><span class="medium">is a bird</span> <span class="mediumBold">without wings.</span> <br><span class="author">Salvador Dali</span> </h3> </div> </div> </div> </div> </div> <!--end parallax 1-->
December 21, 201312 yr Author Okay, I kind of figured out what i need to do. I need to make the height of the parallax, which is located in css file, relative to the height of the image located in the html file. However, I don't know how i would call the image data from the html file into the css file in order to calculate the parallax height. Can anyone help me do this. Parallax css .parallax{ width:100%; height:700px; padding:0; margin:0; background-attachment:fixed; background-repeat:no-repeat; border-top:10px solid rgba(0,0,0,0.2); border-bottom:10px solid rgba(0,0,0,0.2); color:#000; position:relative; } .parallax .quoteWrap{ display:table; width:100%; height:100%; padding:0 !important; margin:0 !important; } .parallax.fixed{ background-attachment:fixed; } .parallax.fixed-desktop{ background-attachment:fixed !important; } .parallax .quoteWrap .quote{ display: table-cell; vertical-align:middle; } .parallax { text-align:center; } .parallax h3 span{ text-shadow: 0px 0px 5px #222; }
Create an account or sign in to comment