I am working on a website for my personal use and have developed a splash page. I have a couple of images with some lines to split the page up up a little bit. Here is the splash page.
The main issue I have is that I have used absolute position within my CSS for the position of each element. Obviously depending on the screen that the viewer will be using, it will be positioned left/right, not in the middle. I thought of using a center starting point and using relative positioning. Would that be the correct way to go down?
Is there a specific way in which I can achieve the elements to be centered and in that "formation" no matter on the screen resolution?
HTML
<DOCTYPE html>
<html>
<head>
<title>Daniel Hopkins Personal Website</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div class="hr_top"> </div>
<div class="hr"> </div>
<div class="hr_bot"> </div>
<center>
<div class="logo">
<img src="logo.png"/>
</div>
<div class="logoname">
<img src="logoname2.png"/>
</div>
<div class="enter"><b><a href"home.html">Enter</a></b>
</div>
</body>
</html>
CSS
body {}
.hr {
width:2px;
height:350px;
background-color:#000000;
position:absolute;
top:140px;
left:884px;
z- index:10;
background: -webkit-linear-gradient(white, black, white);
}
.logo {
position:absolute;
top:200px;
left:640px;
z-index:10;
}
.logoname {
position:absolute;
top:260px;
left:900px;
z-index:10;
}
.hr_top {
width:600px;
height:2px;
position:absolute;
top:180px;
left:640px;
z-index:10;
background: -webkit-linear-gradient(left, white, black, white);
}
.hr_bot {
width:600px;
height:2px;
background-color:#000000;
position:absolute;
top:442px;
left:640px;
z-index:10;
background: -webkit-linear-gradient(left, white, black, white);
}
.enter {
position:absolute;
top:400px;
left:910px;
z-index:10;
font-size:22px;
font-variant:small-caps;
font-style:bold;
font-family:Helvetica;
color:black;
}
a:link {
text-decoration:none;
color:#000000;
}
/* unvisited link */
a:visited {
text-decoration:none;
color:#000000;
}
/* visited link */
a:hover {
text-decoration:underline;
color:#000000;
}
/* mouse over link */
a:active {
text-decoration:underline;
color:#000000;
}
/* selected link */