Centering on a page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ashkaan57@hotmail.com

    Centering on a page

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

    Thanks.

  • dorayme

    #2
    Re: Centering on a page

    In article
    <1170448540.768 190.23050@q2g20 00cwa.googlegro ups.com>,
    ashkaan57@hotma il.com wrote:
    How can I center a page on the screen, regardless of screen
    resolution?
    I tried <div style=" text-align:center"bu t 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

    Comment

    • =?ISO-8859-1?Q?G=E9rard_Talbot?=

      #3
      Re: Centering on a page

      ashkaan57@hotma il.com wrote :
      How can I center a page on the screen, regardless of screen
      resolution?
      I tried <div style=" text-align:center"bu t it centers everything,
      including the text.
      >
      Thanks.
      Centring using CSS by D. Dorward


      Also
      Interactive demo on CSS horizontal alignment and horizontal formating


      Gérard
      --
      Using Web Standards in your Web Pages (Updated Dec. 2006)
      The MDN Web Docs site provides information about Open Web technologies including HTML, CSS, and APIs for both Web sites and progressive web apps.

      Comment

      Working...