...

View Full Version : How to center a Scrolling nav....



threedash
04-27-2010, 05:51 AM
So I am working on this portfolio site for a friend and the main idea behind this site is it's horizontal scrolling.

The REAL meat of my problem that I can't seem to figure out is how to "center" the nav (the 4 images) to the "body" as seen in the pictures.

http://threedash.com/READING/reading01.jpg
http://threedash.com/READING/reading02.jpg
http://threedash.com/READING/reading03.jpg

This is where I am at right now, "threedash.com/READING"



basically, when the website scrolls, I want that nav to land perfectly in the middle of the sections, regardless of the "viewer" browser's window size.


Any suggestions or programming would be helpful.

SB65
04-27-2010, 07:41 AM
#navigation {
height:198px;
left:0;
margin:125px auto 0;
/*position:fixed;*/
top:0;
width:650px;
}

will centre your #navigation div. When an element has a width (and the page has an appropriate doctype for IE), setting left and right margins to auto will centre the element.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum