I set the width of my page to 760px, but need to to center it on page?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
User avatar
duplay
Power Poster
Power Poster
Posts: 289
Joined: Tue Mar 14, 2006 1:57 pm

I set the width of my page to 760px, but need to to center it on page?

Post by duplay »

I set the width of my page to 760px to accommodate the flash header width760. The page is aligned to the left of the screen. How can I center what I have (entire page and header) in the middle of a viewers screen? not to the left?

Thanks


http://pages.sparcc.org/plain/
Last edited by duplay on Tue Jan 02, 2007 4:28 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: I set the width of my page to 760px, but need to to center it on page?

Post by Dr.CSS »

uh your flash is outside the body, you might want to put the back in so it has something to go in...

/>





 
  This gave an error, no some where before it, so take it out and move this all down...




May I suggest putting it here... this side of the pagewrapper....











Then this will work...

/* center wrapper, min max width */
div#pagewrapper {width: 760px;
  border: 1px solid black;
  margin: 0 auto;      /* this centers wrapper */
  max-width: 80em;  /* IE wont understand these, so we will use javascript magick */ (in the )
  min-width: 60em;
  You can take these out if you are going fixed width... and the call in the for IE JS...
  background-color: #fff;;
  color: black;
}
somedolphin

Re: I set the width of my page to 760px, but need to to center it on page?

Post by somedolphin »

Thanks so much Mark this helped me too  :D
Post Reply

Return to “Layout and Design (CSS & HTML)”