HOW DO I CENTER MY WEB PAGES!

Post Reply
juneoates1

HOW DO I CENTER MY WEB PAGES!

Post by juneoates1 »

I am having problems centering my web pages in PhotoImpact XL. I completed the web site tutorial adding the swapping images and slideshow and it looks great but when I saved as html and viewed it - the website was all to the left of the screen. I changed the html code to center the webpage by adding <center> and although this centralised the webpage on the screen, it left behind some of the content i.e. the slideshow, some of the rollover text and the swap image effect!

Is there a way of centralising the web page during the design process or any other way of doing this??
DomGer

Post by DomGer »

if you post the code maybe i can help. Its not always be done with the center tag....

Gruesse
-DomGer
juneoates1

RE: Centering Pages of Website - CODE!

Post by juneoates1 »

I placed the <center> tag after <html> and before <head> and although it worked by centering the whole web page it left out the content of the slideshow and the swap images behind to the left.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<center>

<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="PhotoImpact">
<META NAME="PhotoImpact Document" CONTENT="C:\Documents and Settings\Mrs Oates\Desktop\PhotoImpact Tutorial\files\web3.ufo">
Last edited by juneoates1 on Sun Jun 04, 2006 11:18 am, edited 1 time in total.
DomGer

Post by DomGer »

this is what i expected. PI creates not a very good code. The Code you posted ist broken. Please try to post the code only between

Code: Select all

<BODY BGCOLOR="#DEDEB2" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
...and....

Code: Select all

</html>
otherweise you can send me the full code per eMail. domger at freenet dot de.

you wrote that the center tag does not bring the result you expected. Did you place the <center> after the body tag, so it´s like this:

Code: Select all

<BODY BGCOLOR="#DEDEB2" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">

<center>
<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0">
and did you place the </center> tag before the </body> tag, so it´s like this:

Code: Select all

</center>
</body>
</html>
did you?

gruesse
-DomGer
DomGer

Post by DomGer »

placing the <center> tag as you did is def. the wrong way my friend. You must place it as i described in my last post. Only that is correct coding.
juneoates1

Positioning Slideshow

Post by juneoates1 »

Even after altering the html code to reposition my web pages I still find that the slideshow stays in the same position as it seems to be placed there using relative co-ordinates and so it stays in position even after centering everything else!
Last edited by juneoates1 on Sat Jun 24, 2006 11:32 pm, edited 1 time in total.
DomGer

Post by DomGer »

juneoates1, again: This is WRONG ^.
i wrote 2 times how to do correctly.
juneoates1

Post by juneoates1 »

Sorry, I just put the whole code on to look at! I tried putting it where you said but the same keeps happening. I think it's something to do with the fact that when you add the slideshow etc. it adds it in place using absolute placement and even though I can get the website centered the slideshow stuff stays in the previous placement!

Its a pity I cannot find a way of centering the website during the design in PI - I wonder if the updated versions allow you to center the webpage in the design process?
keenart

Post by keenart »

Sometimes when you have a page that will not center because of elements that do their own thing, you might have to try a workaround.

Create the Page and then as the body create a single cell table, all elements are confined to the table. Centering a table or cell is much easier.
juneoates1

Thanx

Post by juneoates1 »

Thanks for all your help, I will have to muck about with the code a bit now!
DomGer

Post by DomGer »

Ok then. The only way i see is to edit the code in the correct way by hand using a html editor.
Post Reply