By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,447 Members | 1,172 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,447 IT Pros & Developers. It's quick & easy.

Centering on a page

P: n/a
How can I center a page on the screen, regardless of screen
resolution?
I tried <div style=" text-align:center"but it centers everything,
including the text.

Thanks.

Feb 2 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article
<11*********************@q2g2000cwa.googlegroups.c om>,
as*******@hotmail.com wrote:
How can I center a page on the screen, regardless of screen
resolution?
I tried <div style=" text-align:center"but it centers everything,
including the text.
In that case why don't you override what you do not want centered
within the div? For example, if there is a paragraph in there,
put in a <pand for good p {text-align:left;} and so on for
other things inside.

--
dorayme
Feb 2 '07 #2

P: n/a
as*******@hotmail.com wrote :
How can I center a page on the screen, regardless of screen
resolution?
I tried <div style=" text-align:center"but it centers everything,
including the text.

Thanks.
Centring using CSS by D. Dorward
http://dorward.me.uk/www/centre/

Also
Interactive demo on CSS horizontal alignment and horizontal formating
http://www.gtalbot.org/NvuSection/Nv...Alignment.html

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages
Feb 3 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.