Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[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?
 
Skilled Illusionist
Joined
Nov 24, 2007
Messages
329
Reaction score
9
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.
 
Newbie Spellweaver
Joined
Nov 18, 2007
Messages
85
Reaction score
0
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?
 
Senior
Loyal Member
Joined
Feb 8, 2008
Messages
1,873
Reaction score
42
did you learn your language through a book or web reference?
 
Newbie Spellweaver
Joined
Nov 18, 2007
Messages
85
Reaction score
0
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.
 
Senior
Loyal Member
Joined
Feb 8, 2008
Messages
1,873
Reaction score
42
because most of the references answer all of these questions so i suggest readong up on those because they most likely teach is alot better
 
Newbie Spellweaver
Joined
Nov 18, 2007
Messages
85
Reaction score
0
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.
 
Newbie Spellweaver
Joined
Nov 21, 2008
Messages
37
Reaction score
0
Just simple use

PHP:
<center> and </center>
 
Custom Title Activated
Loyal Member
Joined
Jun 28, 2007
Messages
2,986
Reaction score
3
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
Top