Jump to content
Sign in to follow this  
Calamier

Centering my page

Recommended Posts

I figured i'd post on a dif topic for this one. I'm having some trouble getting my page to center. if I just use the center tag it only moves the top section, because the rest of the pieces are on div tags. But the page needs to be centered in every resolution. Thanks for help in advance.Edit : BTW heres the site - www.rocksolidautocenter.com

Share this post


Link to post
Share on other sites

you're using absolute positoin in each 'layer'...thats why you cant center itprobably it's a temporary solution, i guess...try to use relative values, and put all in a 'root' div, then center only this mother divhope i helped ^^by the way, nice design, congratulations :)

Share this post


Link to post
Share on other sites
Edit : Flawed....

lmfaoso you are still having the problem? I'm almost done for the day here at work, but I'll be online later on tonight - I'll come back to this post to see if you have an update.Keep up the good work. :)P.S. My signature is more directed to the people who come in and say:"how do I make a javascript slide show of pictures"When all you have to do is google "javascript slide show" and you'll two days of scripts to choose from.You, have obviously put some effort into your code - especially since you have live working examples - so I wouldn't say you fall into that category. However, I am happy to see that it got some creative juices flowing and sparked off another round of troubleshoot - just don't kill yourself over it - someone will help you find a solution. :)

Share this post


Link to post
Share on other sites

Ok set all your positioning to relative (position:relative)then do this...<div style="width:[widthofyourpage]px;margin:auto">...your existing code....</div>This should center everything.

Share this post


Link to post
Share on other sites

aspnetguy, I was just doing that, getting the instructions from THIS PAGE. It didn't work though. It's all pushed to the left. I still haven't set the positions to relative because when i do, it messes the page up.THIS is the website with the positions set as absoluteTHIS is the website with the positions set as relativeThanks for your help i appreciate it.....

Share this post


Link to post
Share on other sites

have you changeed:

<TABLE WIDTH=800 BORDER=0 CELLPADDING=0 CELLSPACING=0>

to

<TABLE WIDTH=800 BORDER=0 CELLPADDING=0 CELLSPACING=0 ALIGN=center>

?

Share this post


Link to post
Share on other sites
I don't even have any tables opn the page, why would I do that?  I tried adding it and it didn't work, just messed the page up more.

<TABLE WIDTH=800 BORDER=0 CELLPADDING=0 CELLSPACING=0>	<TR>  <TD COLSPAN=13> 	 <IMG SRC="images/rsa_01.gif" WIDTH=800 HEIGHT=108 ALT=""></TD>  <TD> 	 <IMG SRC="images/spacer.gif" WIDTH=1 HEIGHT=108 ALT=""></TD>	</TR>	<TR>  <TD COLSPAN=2 ROWSPAN=5> 	 <IMG SRC="images/rsa_02.gif" WIDTH=59 HEIGHT=447 ALT=""></TD>  <TD ROWSPAN=2> 	 <a href="index.html"><IMG SRC="images/rsa_03.gif" ALT="" WIDTH=302 HEIGHT=58 border="0"></a></TD>  <TD COLSPAN=10>......

You do have tables in your code

Share this post


Link to post
Share on other sites

It appears that with the extensive absolute positioning you have used that it would be a lot of work to get it to center.For this reason I try and a void absolute positioning when ever posible.I always make a <div></div> and place everything inside it and then use relative positioning to the parent div. that way no matter where i move the div everything inside stays lined up properly.sorry I couldnt be much help.

Share this post


Link to post
Share on other sites
Guest dompadidodadollidado

I'm also trying to center my page. With aspnetguy's method I get the page to the center but at the top. How can I move it down to the centerpoint ?

Share this post


Link to post
Share on other sites

I don't think you can vertically center the page but if you add <br /> tags before the mother <div> (if you used my method) then that will bump the page down. Use as many <br /> as you need to get it down to where you want it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...