I have been having some major issues with the layout of a very basic splash page for an upcoming project I am working on.I began the project and tweaked around with margins via .css for hours last night to get the logo pseudo-centered (albeit not exact) on Google Chrome (my browser of choice).
I fired up Firefox and IE this morning to find the logo radically out of place on them browsers. The text alignment appears to be working as intended however.
Here is the .CSS:
/* #######################################################################
KING OF CARDS ONLINE: CSS STYLES
######################################################################## */
Body {
background-color:#5A4A42 ;
}
#splash {
margin-top:20%;
margin-left:44%;
margin-right:44%;
width:170px;
}
p {
color:#FFFFFF;
font-family:Arial,Helvetica,sans-serif;
font-size:0.875em;
text-align:center;
}
img {
margin-left:15%;
}
footer {
width:100%;
color:#FFFFFF;
font-family:Arial,Helvetica,sans-serif;
font-size:0.875em;
position: fixed;
bottom: 0px;
}
/* #######################################################################
END OF FILE
######################################################################## */
And here is the HTML:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Online Action Trading Card Game.">
<title>KOCO: Online Action TCG</title>
<link href="kocostyle.css" rel="stylesheet" type="text/css">
</head>
<body>
<header></header>
<section id=splash>
<img src=images/logo_trans_matte.gif>
<p>Action Based: Online TCG</p>
</section>
<footer>
<p> © 2010 King Of Cards Online || liamhockley@hotmail.com </p>
</footer>
</body>
</html>
I intend for this project to be fairly long term (potentially spanning the entire duration of my bachelors in comp sci), hence the experimentation with the newer HTML tags.
In such a situation, would using the <center> tag on the logo image really be a bad thing? or is there a better, more standards compliant way to consistently achieve the same via oure CSS (as I am currently attempting). The image size that I am working with is 108x55 px.
Thanks.