Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Responsive resizing help

Featured Replies

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-->

 

  • 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.