Adzuki Yako
Sep 16th, 2010, 06:32 PM
Hello guys.
I am a total noob and I have managed to create a website with which I am quite happy so far. But I can't seem to find How I can take my whole stuff and put it in a container of some sort and center it! Heres my code... Is it possible to .. contain the whole thing and center it? Thanks for your help :)
<!DOCTYPE html>
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta property="fb:admins" content="Kiyako">
<title>TITLE</title>
<meta name="author" content="Adzu Kiyako">
<meta name="copyright" content="Adzu Kiyako 2000–2010 and beyond...">
<meta name="robots" content="noindex">
<meta name="viewport" content="width=780">
<base target="_top">
<style type="text/css">
<!--
body {margin: 3em; background-image: none; background-color: white; font-size: .8em; text-align: left; }
-->
</style>
</head>
<body id="htmlsource">
<body style="background-color:#292929;">
<div style="background-color: #292929; color: white; position: absolute; left: 100px; top: 10px; width: 175px; height: 400px; padding: 5px; padding-top: 220px;"><center><img src="XXXXX" alt="Home"><br><br><br><br><br><img src="XXXXX" alt="Technology"><br><br><br><br><br><img src="XXXXX" alt="Demo (Video)"><br><br><br><br><br><img src="XXXXX" alt="About Us"><br><br><br><br><br><img src="XXXXX" alt="Contact Us"></center></div>
<div style="position: absolute; left: 185px; top: 10px; background-color: #292929; width: 800px; height: 120px; padding: 5px;"><img src="XXXXX" width="400" height="147" border="0" alt="alt text"></div>
<div style="position: absolute; left: 610px; top: 10px; background-color: #292929; width: 700px; height: 150px; padding: 30px;"><img src="XXXXX" width="651" height="92" border="0" alt="alt text"></div>
<div style="z-index: 2; position: absolute; left: 500px; top: 210px; background-color: white; width: 560px; height: 380px; padding: 10px; border: red 2px dashed;">
<script type="text/javascript">
<!--
var viewportwidth;
var viewportheight;
// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
if (typeof window.innerWidth != 'undefined')
{
viewportwidth = window.innerWidth,
viewportheight = window.innerHeight
}
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
else if (typeof document.documentElement != 'undefined'
&& typeof document.documentElement.clientWidth !=
'undefined' && document.documentElement.clientWidth != 0)
{
viewportwidth = document.documentElement.clientWidth,
viewportheight = document.documentElement.clientHeight
}
// older versions of IE
else
{
viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
viewportheight = document.getElementsByTagName('body')[0].clientHeight
}
document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
//-->
</script>
<h1><center>This will contain the Slideshow.</h1></center> <p><center>Border can be changed.</center></p></div>
<div style="position: absolute; left: 40px; top: 640px; background-color: transparent; padding: 5px; font-size: 13pt;"><img src="XXXXXXX" alt="Temporary Icons (facebook, twitter, etc.)"></div>
<div style="z-index: 1; position: absolute; left: 650px; top: 655px; background-color: transparent; padding: 10px; color: white; ">Copyright © 2010 | WEBSITE | Design by ZukiDub</div>
</body>
<!-- ~Fin~ -->
</html>
Note that I have censored some content, but you get the point. I don't know how to make a "super div" to contain the others, or is that even possible! Thank you!
I am a total noob and I have managed to create a website with which I am quite happy so far. But I can't seem to find How I can take my whole stuff and put it in a container of some sort and center it! Heres my code... Is it possible to .. contain the whole thing and center it? Thanks for your help :)
<!DOCTYPE html>
<html lang="en"
xmlns="http://www.w3.org/1999/xhtml"
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta property="fb:admins" content="Kiyako">
<title>TITLE</title>
<meta name="author" content="Adzu Kiyako">
<meta name="copyright" content="Adzu Kiyako 2000–2010 and beyond...">
<meta name="robots" content="noindex">
<meta name="viewport" content="width=780">
<base target="_top">
<style type="text/css">
<!--
body {margin: 3em; background-image: none; background-color: white; font-size: .8em; text-align: left; }
-->
</style>
</head>
<body id="htmlsource">
<body style="background-color:#292929;">
<div style="background-color: #292929; color: white; position: absolute; left: 100px; top: 10px; width: 175px; height: 400px; padding: 5px; padding-top: 220px;"><center><img src="XXXXX" alt="Home"><br><br><br><br><br><img src="XXXXX" alt="Technology"><br><br><br><br><br><img src="XXXXX" alt="Demo (Video)"><br><br><br><br><br><img src="XXXXX" alt="About Us"><br><br><br><br><br><img src="XXXXX" alt="Contact Us"></center></div>
<div style="position: absolute; left: 185px; top: 10px; background-color: #292929; width: 800px; height: 120px; padding: 5px;"><img src="XXXXX" width="400" height="147" border="0" alt="alt text"></div>
<div style="position: absolute; left: 610px; top: 10px; background-color: #292929; width: 700px; height: 150px; padding: 30px;"><img src="XXXXX" width="651" height="92" border="0" alt="alt text"></div>
<div style="z-index: 2; position: absolute; left: 500px; top: 210px; background-color: white; width: 560px; height: 380px; padding: 10px; border: red 2px dashed;">
<script type="text/javascript">
<!--
var viewportwidth;
var viewportheight;
// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
if (typeof window.innerWidth != 'undefined')
{
viewportwidth = window.innerWidth,
viewportheight = window.innerHeight
}
// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
else if (typeof document.documentElement != 'undefined'
&& typeof document.documentElement.clientWidth !=
'undefined' && document.documentElement.clientWidth != 0)
{
viewportwidth = document.documentElement.clientWidth,
viewportheight = document.documentElement.clientHeight
}
// older versions of IE
else
{
viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
viewportheight = document.getElementsByTagName('body')[0].clientHeight
}
document.write('<p>Your viewport width is '+viewportwidth+'x'+viewportheight+'</p>');
//-->
</script>
<h1><center>This will contain the Slideshow.</h1></center> <p><center>Border can be changed.</center></p></div>
<div style="position: absolute; left: 40px; top: 640px; background-color: transparent; padding: 5px; font-size: 13pt;"><img src="XXXXXXX" alt="Temporary Icons (facebook, twitter, etc.)"></div>
<div style="z-index: 1; position: absolute; left: 650px; top: 655px; background-color: transparent; padding: 10px; color: white; ">Copyright © 2010 | WEBSITE | Design by ZukiDub</div>
</body>
<!-- ~Fin~ -->
</html>
Note that I have censored some content, but you get the point. I don't know how to make a "super div" to contain the others, or is that even possible! Thank you!