Click here to Skip to main content
15,896,432 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: How to create web page embedded with media player without using ActiveX controls? Pin
Vasudevan Deepak Kumar29-Mar-07 9:31
Vasudevan Deepak Kumar29-Mar-07 9:31 
QuestionChanging Background image at run time Pin
EEmaan28-Mar-07 23:57
EEmaan28-Mar-07 23:57 
AnswerRe: Changing Background image at run time Pin
L Viljoen29-Mar-07 1:07
professionalL Viljoen29-Mar-07 1:07 
QuestionHTML Valign Pin
L Viljoen28-Mar-07 23:08
professionalL Viljoen28-Mar-07 23:08 
AnswerRe: HTML Valign Pin
Bradml29-Mar-07 0:00
Bradml29-Mar-07 0:00 
GeneralRe: HTML Valign Pin
L Viljoen29-Mar-07 1:01
professionalL Viljoen29-Mar-07 1:01 
AnswerRe: HTML Valign Pin
RichardGrimmer29-Mar-07 5:54
RichardGrimmer29-Mar-07 5:54 
AnswerRe: HTML Valign Pin
L Viljoen29-Mar-07 21:32
professionalL Viljoen29-Mar-07 21:32 
Thanx to everyone that contributed,
I am able to center my content even when resizing and decided to share my code with you all: Wink | ;)

The JavaScript Goes in the <head> </head> tags

===============================================================================================

<!-- Gets and Sets the size of the Table to allow VAlign -->
<script language="javascript" type="text/jscript">
function setHeight(){
var myWidth = 0, myHeight = 0;
if( typeof( window.innerWidth ) == 'number' ) {
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
//window.alert( 'Width = ' + myWidth ); //Show When Debugging
//window.alert( 'Height = ' + myHeight ); //Show When Debugging

//Set Height of Table
document.getElementById('placeholderTable').style.height=myHeight+"px";
}


</script>
<!-- ============================= -->
================================================================================================

And then your body should look something like this

=============================================================================================
<body style=" margin-left:0px; margin-right:0px; margin-top:0px; margin-bottom:0px; vertical-align:middle" onload="setHeight();" onresize="setHeight();">
<div align="center">
<table id="placeholderTable" cellpadding="0" cellspacing="0" border="0" style="vertical-align:middle;" >
<tr>
<td>
//Table Containing Content
</td>
</tr>
<table>
</div>
</body>
================================================================================================

Enjoy!

L Viljoen
Web Developer - PCW New Media
South African Branch
QuestionRepeater Control data export problem Pin
VaibhavTiparadi28-Mar-07 23:08
VaibhavTiparadi28-Mar-07 23:08 
QuestionCrystalReportviewer : Navigation buttons Pin
paijyj28-Mar-07 22:46
paijyj28-Mar-07 22:46 
QuestionCDO Message encoding Pin
Paddy Boyd28-Mar-07 22:17
Paddy Boyd28-Mar-07 22:17 
AnswerRe: CDO Message encoding Pin
Vasudevan Deepak Kumar29-Mar-07 9:29
Vasudevan Deepak Kumar29-Mar-07 9:29 
GeneralRe: CDO Message encoding Pin
Paddy Boyd29-Mar-07 22:19
Paddy Boyd29-Mar-07 22:19 
Question:: Dynamic Mail ID Creation :: Pin
Manigandan Ramadoss28-Mar-07 22:16
Manigandan Ramadoss28-Mar-07 22:16 
AnswerRe: :: Dynamic Mail ID Creation :: Pin
L Viljoen28-Mar-07 23:18
professionalL Viljoen28-Mar-07 23:18 
AnswerRe: :: Dynamic Mail ID Creation :: Pin
Vasudevan Deepak Kumar29-Mar-07 9:29
Vasudevan Deepak Kumar29-Mar-07 9:29 
QuestionSession Expiry in Hosting Pin
Narendra Mohan28-Mar-07 16:48
Narendra Mohan28-Mar-07 16:48 
AnswerRe: Session Expiry in Hosting Pin
Vasudevan Deepak Kumar29-Mar-07 9:30
Vasudevan Deepak Kumar29-Mar-07 9:30 
QuestionIs Joomla open source code truly open? [modified] Pin
Nsiku Banda28-Mar-07 12:08
Nsiku Banda28-Mar-07 12:08 
AnswerRe: Is Joomla open source code truly open? Pin
Guffa28-Mar-07 22:04
Guffa28-Mar-07 22:04 
GeneralRe: Is Joomla open source code truly open? Pin
Nsiku Banda29-Mar-07 6:24
Nsiku Banda29-Mar-07 6:24 
Question[Message Deleted] Pin
gubba28-Mar-07 9:40
gubba28-Mar-07 9:40 
AnswerRe: Open a pop up window Pin
Guffa28-Mar-07 11:24
Guffa28-Mar-07 11:24 
General[Message Deleted] Pin
gubba28-Mar-07 14:00
gubba28-Mar-07 14:00 
AnswerRe: Open a pop up window Pin
Guffa28-Mar-07 21:08
Guffa28-Mar-07 21:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.