Computing.Net > Forums > Web Development > centering a page with CSS

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

centering a page with CSS

Reply to Message Icon

Name: richeleau
Date: February 24, 2004 at 06:34:15 Pacific
OS: Win ME
CPU/Ram: Duron 800MHz/128MB
Comment:

Hi,

can you center a webpage in CSS much in the same way as you can using tables?

Cheers,
Richeleau



Sponsored Link
Ads by Google

Response Number 1
Name: Geiri
Date: February 24, 2004 at 06:54:40 Pacific
Reply:

I think you have to center in css by using margins ?
left-margin 25% right-margin 25%

somthing like that

Maby some one knows any beter


0

Response Number 2
Name: anonproxy
Date: February 24, 2004 at 11:30:24 Pacific
Reply:

For block-level elements, like div tags, use margins. You can also use presized block elements which fill space on either side and position your content in an element between them (not as clean a method). For inline elements, like text, use "text-align:center".


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: centering a page with CSS

horizontal align with css? www.computing.net/answers/webdevel/horizontal-align-with-css/658.html

centering the page www.computing.net/answers/webdevel/centering-the-page/2586.html

Securing a Web Page with a password www.computing.net/answers/webdevel/securing-a-web-page-with-a-password/1079.html