Click to See Complete Forum and Search --> : Problems with scrolling and centering vertically


jonthomas83
06-05-2007, 02:07 PM
1. Hi guys I would like to place a strip of content across the entire width of a web page and would like to center it vertically.

Imagine a 400px rectangle height x 100% width across the center of the page with white space auto above and below.

Any ideas how to do this?

I've tried to display it as a block and I've tried auto margins on the top and bottom but no luck whatsoever.

2. I would also like to create a fixed size scrollable div where the scrollbar only appears on the right hand side and not along the bottom. I've tried all ways but even though the bottom scroll bar is inactive it still shows.

Is there any way to get rid of it?

Many thanks

Jonathan

timdenty
06-07-2007, 05:08 AM
The only way I could think of to achieve the content strip would be to position the div absolutely 50% from top and 0 from left. Then give it a 400px height and then a negative top margin of -200px, thus it should center. Never used this myself but, try it & see how well it works.

Regarding the scrollbar - not too sure on that, perhaps another kind soul will help you on this.

jonthomas83
06-07-2007, 06:21 PM
Brilliant, the first plan worked and it's dead centre!!! yey!

I love the site tim, phenomenal job mate. I'm from Bridgend so nice to meet you! I'm just trying to establish myself as a web designer and this is my frist paid job like so I'm really pleased. If you get any work coming your way and you may find yourself overloaded, give me a shout, I need all the work I can get at the moment! Any advice from a professional like yourself would be well appreciated!

Edit: I really didn't mean for that to sound disrespectful, I've pretty much ploughed through you're portfolio and wow!!! what can I say except I'm so not worthy! What an inspiration your work is.

Thanks for your help.

If anyone could still help me out with the scroll bar problem I'd be very grateful for any help. Cheers, Jon.

timdenty
06-08-2007, 05:55 AM
Hi Jon - glad the page is coming together for you, and thanks for the comments.

I don't really work directly for end-clients currently, so don't have any work to subcontract to anyone I'm afraid. Perhaps you can let us all see your work in the graphics section once it's finished. All the best.

T