Reviews, updates and in depth guides to your favourite mobile games -
Forum Home Latest Posts Search Help Subscribe

CSS Question

Page: 1 Reply
Jan 27th 2007#176074 Report
Member since: Mar 27th 2001
Posts: 2237
Alright you CSS gurus I'm kinda slow but I am learning this stuff.

I ran into a problem though. I want to center my content div on the page ...right.

Well after some reading I found the [CODE]margin: 0 auto;[/CODE] method. Found that I can't use [CODE]position:whatever;[/CODE]... so I deleted it from my style sheet.
Alright great! it works....but but but... Now what do I do to get a top margin?

I tryed [CODE]margin: 50 auto;[/CODE].... doesn't work
I tryed adding [CODE]margin top: 50;[/CODE]....doesn't work

Html is here

CSS is here
Reply with Quote Reply
Jan 27th 2007#176076 Report
Member since: Mar 18th 2001
Posts: 6632
margin-top: 50px;


margin: 50px 0 0 0;

If you are trying to center it in the page, it is really really hard to do with CSS. You can search for vertical centering CSS or something. There are several methods, all are hacks and pretty complicated.
Reply with Quote Reply
Jan 29th 2007#176088 Report
Member since: Mar 27th 2001
Posts: 2237
Thanks Dek, I was missing the "-" in margin-top
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum