can't center my page

cybergolflesson

New Member
Hi, I'm a newbie to this forum so howdy all!! I can't center my website. My resolution is set to 1280x800 and can't figure out how to center my site...I'd like for it to center in all browsers but would happy figuring out how to center with this resolution. I use dreamweaver cs3. This is the page I'm trying to center, it's not quite complete as it is going to be my template for my other pages. Thanks for any tips.

http://www.cybergolflessons.com/index1.php
 

JakClark

New Member
Hiya, welcome to the forum :)

I'm no expert when it comes to centering pages, but the way I do it is by wrapping the whole website in a div container, then applying the following css to style the container.

I see you've already inserted a container wrapped around the whole site, so just apply this code to the css.
Code:
.yourdiv {
margin: auto auto;
}

It's as simple as that. Apologies if It doesn't work for you, I may have explained it wrongly according to the layout of your website.

Regards
-Jak :)
 

ImKevin

New Member
Here is how I do it.

body{margin:0 auto; padding:0; text-align:center;}
.wrapper{margin: auto; width: 1280px; 800px;}

put the <div class="wrapper"> right after the <body> and the </div> tag right before the </body> tag.

like this.

<body>
<div class="wrapper">
put your table or what have you here.
</div>
</body>

You might want to consider using css instead of tables for your layouts.
 

JakClark

New Member
That sound's better than my method ;)

I was under the presumption that he already had a container with everything inside, upon inspecting his source code. I may have been wrong :L

Regards,
-Jak :)
 

cybergolflesson

New Member
Thanks sooooo much guys. I've been trying to figure this out for longer than I care to say (embarrassed). Still have a slight problem at the bottom but not to worried. Would love to know how to use css instead of tables. Any easy reading or examples of this?

Question on using css instead of tables. Do you mean I can change text (in certain areas, like the menu) for multiple pages using css similar to changing styles?

Thanks again guys!!!
 

smoovo

New Member
CSS stylesheet can save you time and be very useful when you want to change style of particular part in your page, and it will affect all of other pages that using the same class or id.

Unfortunately text can't be changed upon a style changes, CSS controls style only. Text can be changed through server side language or client side language, such as PHP and Javascript.

- Enjoy. :)
 

omglookitsagoat

New Member
I have the same problem on one of the websites I was working on. I'll try this out too.

btw, no offense or anything, but you should work on your design a bit more. try to get a more effective color scheme. You have too many different colors and there's not much unity. It makes the page look too busy and too many contrasting colors fight with each other. Also, don't use yellow colored text against a white background because there's not enough contrast.
 

anna

New Member
I have to agree with the the goat. You definitely need to work on the design; to be honest, it's atrocious.

Kill the drop shadow behind the logo text, don't use colored text on white backgrounds. The gradients are lame, the header image is just plain weird and the font is lacking. I would suggest a sans-serif font.

Oh, and you can actually make a copyright symbol in your footer (instead of a "c" surrounded by parenthesis) by holding the alt key down and pressing 0169.

Good luck!
 
Top