[CSS/HTML/JS] Centering text

Newbie Spellweaver
Joined
Nov 18, 2007
Messages
85
Reaction score
0
Ok, so I am doing a project for school paper. Right now I am doing a splash page with flash animation, it will show the flash, then in the after the flash it will redirect (Action script). I am also going to have a button at the bottom in the center that is link to the homepage. My question is, how can I get it to be center on all screen sizes. On the school computer, it is center. On my (wide screen), it is about 30 pixel off. Here is the source code.

Code:
<!DOCTYPE html PUBLIC "-//w3c//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml-transitional.dtd">

<html xlms="http://www.w3.org/1999/xhtml">

    <head>

      <title>Cougar Tracks</title>
      <meta http-equiv="Content-Type"
        Content="text/html; charset=UTF-8" />
<style type="text/css">
p.bc
{
position:absolute;
left:490px;
top:490px
}
</style>
    </head><br />
<center><object width="550" height="400">
<param name="movie" value="cougar.swf">
<embed src="cougar.swf" width="492" height="391">
</embed>
</object></center>

<body bgcolor="black" text="white" alink="white" vlink="white" link="white">
<p class="bc"><a href="index.htm">Home Page</a></p>




  </body>
</html>


Right now the CSS is just temp. like that. I try putting it in center, but it was at the top. Any help please?
 
It would probably just be easier to put it into a table and then center the column.
Code:
<table width="100%" border=0>
<tr>
<td width="100%">
<center>LINK CODE</center>
</td></tr></table>
Sure it's more code then other methods but it works.
 
Eek....hate tables, but I try it.

Know any way to make it where it would appear 10pixel above the bottom of the page on all screen sizes also?
 
Taking classes in high school that is online, that has web reference links. It is for learning, so I only know XHTML mainly. I know basic CSS, and some JS.

Like I can get it where I want it, but I don't want it to move, so it will be in that spot for all screen resolutions.
 
I found I am just going to use margins in CSS, with a center tag.

Still got to test it on other screen sizes though.
 
Just simple use

PHP:
<center> and </center>

No, those are deprecated. We try to use decent and valid HTML here, where you use CSS, not HTML for the mark-up.
 
Back