Solved

Horizontal scrolling website with frames which are centered

Posted on 2013-01-15
6
306 Views
Last Modified: 2013-01-21
Hi,

I'm trying to build a website which has horizontal scrolling frames of 900px x 600px, the 'active' frame is centered in the middle and each frame has right and left margins of 100px.
If the screen is wide enough the end of the left frame can show on the screen and the left of the next screen.

Here is an example: http://www.peter-pearson.com/ 
it also has to have navigation like <a href="#section2">2</a>

How should i do this?

Thanks a lot!!
0
Comment
Question by:peps03
  • 3
  • 3
6 Comments
 
LVL 12

Expert Comment

by:sivagnanam chandrakanth
ID: 38781399
The example site is having the body width as 10861px; and each page is a div with width as 400 px

When user clicks the next link they are showing the next div and hiding the previous one

http://www.peter-pearson.com/js/plugins.js - see this for full understanding

below is the code they are using to scroll

function scrollHere($target){
		$.scrollTo($target, 1400, {
			offset: getOffset()
		});
	}

Open in new window


Hope it explains
0
 

Author Comment

by:peps03
ID: 38781709
Thanks you!
Is it also possible to show the edges of the previous and next frames?
0
 
LVL 12

Assisted Solution

by:sivagnanam chandrakanth
sivagnanam chandrakanth earned 500 total points
ID: 38781764
yes you can, you need to specify proper width and css for the frames
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

Author Comment

by:peps03
ID: 38781866
Hmm i see.
What would i need to adjust to only have a 100px margin left and right of each frame?

And is it also possible to center the slides vertically in the middle?
0
 
LVL 12

Accepted Solution

by:
sivagnanam chandrakanth earned 500 total points
ID: 38782216
set amrgin-left and right as 100px for each frame(ie, each div)

For vertical align add style to frame as vertical-align:middle
0
 

Author Closing Comment

by:peps03
ID: 38803338
Thanks!
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question