css:
html {
min-width:999px;
}
body {
color: #ffffff;
font-family: arial;
min-width:999px;
margin: 0px;
padding: 0px;
background: #040101;
background-image: url(http://berryequipment.net/test/bg.jpg);
background-position: 50% 78;
}
img {
border: 0px;
}
ul, li {
list-style-type: none;
display: inline;
margin: 0px; padding: 0px;
}
a, a:visited {
color: #222;
text-decoration: none;
}
a:hover {
text-decoration: none;
color: #000;
}
a:focus, a:hover, a:active { outline:none }
#container {
text-align: center;
width: 100%;
}
#main_container {
position: relative;
text-align: center;
margin-left: auto;
margin-right: auto;
width: 900px;
}
.header {
position: relative;
text-align: left;
width: 900px;
height: 54px;
}
.logo {
margin-left: 30px;
float: left;
width: 431px;
height: 54px;
background-image: url('tc.jpg');
}
#nav {
margin-right: 30px;
font-size: 12px;
color: #c1c1c1;
float: right;
height: 54px;
line-height: 54px;
}
#content {
position: relative;
top: 15px;
text-align: left;
width: 900px;
background-color: #ffffff;
}
.artbox {
background-image: url('blank.jpg');
position: relative;
float: left;
width: 291px;
height: 187px;
margin-top: 50px;
margin-left: 5px;
}
#thumb1
{
display: block;
width: 291px;
height: 187px;
background: url("images/thumb1.jpg") no-repeat 0 0;
}
#thumb1:hover
{
background-position: 0 -187px;
}
#thumb1 span
{
position: absolute;
top: -999em;
}
#thumb2
{
display: block;
width: 291px;
height: 187px;
background: url("images/thumb2.jpg") no-repeat 0 0;
}
#thumb2:hover
{
background-position: 0 -187px;
}
#thumb2 span
{
position: absolute;
top: -999em;
}
#thumb3
{
display: block;
width: 291px;
height: 187px;
background: url("images/thumb3.jpg") no-repeat 0 0;
}
#thumb3:hover
{
background-position: 0 -187px;
}
#thumb3 span
{
position: absolute;
top: -999em;
}
#underlay{
display:none;
position:fixed;
top:0;
left:0;
text-align: center;
width: 100%;
height:100%;
background-color:#000;
-moz-opacity:0.5;
opacity:.50;
filter:alpha(opacity=50);
}
#lightbox{
display:none;
position: relative;
text-align: left;
margin-left: auto;
margin-right: auto;
width: 900px;
top: -69px;
background-color:#000;
}
index:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<title>creative works of Terry Cantwell</title>
<link href="style.css" rel="stylesheet" type="text/css" title="default">
</head>
<body>
<div id="container">
<div id="main_container">
<div class="header">
<div class="logo"></div>
<div id="nav"><font color="#0dbbd0">portfolio</font> resume blog contact</div>
</div>
<div id="content">
<div class="artbox"><a id="thumb1" href="javascript:void();" onclick="document.getElementById('underlay').style.display='block'; document.getElementById('lightbox').style.display='block';" title="thumb1"><span>Berry Plumbing & Equipment - Website Design / Programming</span></a></div>
<div class="artbox"><a id="thumb2" href="#" title="thumb2"><span>Outlaw Racing Street Car Association - Website Design / Programming</span></a></div>
<div class="artbox"><a id="thumb3" href="#" title="thumb3"><span>Berry Motorsports - Website Design / Programming</span></a></div>
<div class="artbox"></div>
<div class="artbox"></div>
<div class="artbox"></div>
<div class="artbox"></div>
<div class="artbox"></div>
<div class="artbox"></div>
<div id="underlay">
</div>
<div id="lightbox">
test
<a href="javascript:void();" onclick="document.getElementById('underlay').style.display='none'; document.getElementById('lightbox').style.display='none';">Close</a>
</div>
</div>
</div>
</div>
</body>
</html>
For some reason when you click on the first link that has the javascript tied to it to pop up the hidden content, that content is all aligned to the bottom of the div that it is in. You can see here: creative works of Terry Cantwell I don’t understand why?