Solved

Horizontal scrolling website with frames which are centered

Posted on 2013-01-15
6
302 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now