Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > screen center

Reply
Thread Tools

screen center

 
 
Brian Wilson
Guest
Posts: n/a
 
      05-17-2004
Could someone help me with how I could move the box, in the body portion of
this page, to center of the screen? I was wondering if the
"screen.availHeight, screen.availWidth" would be a possibility:



<head>
<script>
document.write("<div style='position:absolute; display:block; top:15;
left:160; width:4; height=345'><img src=vertcolons.gif width=1 height=350
alt= border=0></div>");
</script>
<style>
BODY, TD {
color : #666699;
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
text-align: right;
margin-right:0px;
font-style : normal;
}

..navlink { color: #D66000; text-decoration:none; padding : 3px 4px 3px 4px;
margin : 2px; border-style : solid; border-width:1px; border-color :
#e1e1e7; }
..navlink:hover { color: #D66000; background-color : #F1F1F6; border-style :
solid; border-width:1px; border-color: #F7F7FF #d1d1d1 #d1d1d1 #F7F7FF; }

A:link, A:active { text-decoration : none; color : #666699;}
A:hover { text-decoration : none;}
A:visited { text-decoration : none; color : #666699;}

pagetitle {font-size:11px; font-weight:bold; padding:4px;}
..pagecontent {position:absolute; display:block; top:10px; left:160px;
text-align:left; width:620px;}

..boxtitle {
position:relative;
display : block;
background-color:#4A6BDE;
color:#F9F9F9;
width:100%;
height:19px;
padding:3px 3px 0px 3px;
font-size:10px;
font-weight : bold;
border-style:solid;
border-color:#888899;
border-width:0px 0px 1px 0px;
}
..boxleft {position:absolute; display:block; top: 5px; left: 2px;
width:200px; border: 0px #505050 solid;}
..boxfooter {
position:absolute;
display : block;
background-color:#42B5DE;
color : #F9F9F9;
width:100%;
height:16px;
padding:1px 6px 2px 3px;
font-size:10px;
text-align : right;
border-style:solid;
border-color:#B0B0B0;
border-width:1px 0px 0px 0px;
bottom:0px;
}

</style>
<script>

// Titleline //

function pagelayout() {
document.write("<div id=primelinks style='position:absolute; display:block;
topx; left:10px; text-align:left;'>");

document.write("<p><a href=index.html class=navlink
style='width:140px;'>Home</a><br>");
/*
document.write("<a href=planoverview.html class=navlink
style='width:140px;'>Pricing Plans</a><br><br>");
*/
document.write("<a href=approach.html class=navlink
style='width:140px;'>Design Approach</a><br>");
document.write("<a href=whyus.html class=navlink style='width:140px;'>Why
Use Us?</a><br>");
document.write("<a href=cost.html class=navlink style='width:140px;'>Others
Charge Less</a><br>");
document.write("<a href=aboutme.html class=navlink
style='width:140px;'>About the Designer</a><br>");
document.write("<a href=samples.html class=navlink
style='width:140px;'>Sample Sites</a><br>");
document.write("<a href=contact.html class=navlink
style='width:140px;'>Contact Us</a><br>");
document.write("<a href=aboutme.html class=navlink
style='width:140px;'>Extra 1</a><br>");
document.write("<a href=samples.html class=navlink
style='width:140px;'>Extra 2</a><br>");
document.write("<a href=contact.html class=navlink
style='width:140px;'>Extra 3</a><br>");

document.write("</div>");
document.write("</div>");
}
</script>

<script language="JavaScript">pagelayout();</script>
<title>Sites</title>
</head>
<body background="defaultback_flash2.jpg">

<body>
<script language="JavaScript">pagelayout();</script>
<div class="pagecontent">
<div style="position:absolute; display:block; top:12px; left:10px;
padding-top:0px; width:190px; height:180px; border: 1px #505099 solid;">
<div class="boxleft" style="width:180;height:13"><br>

</div>

</body>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to place a window in the center of the screen ? Tom Parson Java 16 11-24-2005 12:58 AM
Naming of core NASA center with the words "Mission Control Center" & mass use of religious anthem sounding word "Mission" in Context of Space Exploration & the Moon Landing Hoax moonlandinghoaxreligious@yahoo.com Digital Photography 0 09-27-2005 08:28 PM
how to vertical align a site to the center of the screen Eirik Eldorsen HTML 17 08-04-2005 10:56 PM
Center Screen in any resolution or BrowserWidth Greg Cyrus ASP .Net 5 10-01-2004 08:07 AM
How to center ServiceUI.printDialog on screen? terry Java 0 09-11-2003 01:26 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57